[svn r41855] Add a bit hackish option which allows to start from selected
keyword test, doesn't work with rsession yet. --HG-- branch : trunk
This commit is contained in:
@@ -81,6 +81,16 @@ namecontent = [
|
||||
assert 42 == 43
|
||||
|
||||
''')),
|
||||
('testmore.py', py.code.Source('''
|
||||
def test_one():
|
||||
assert 1
|
||||
|
||||
def test_two():
|
||||
assert 1
|
||||
|
||||
def test_three():
|
||||
assert 1
|
||||
''')),
|
||||
|
||||
('testspecial_importerror.py', py.code.Source('''
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@ implied_options = {
|
||||
|
||||
conflict_options = ('--looponfailing --pdb',
|
||||
'--dist --pdb',
|
||||
'--exec=%s --pdb' % py.std.sys.executable,
|
||||
'--exec=%s --pdb' % py.std.sys.executable,
|
||||
'-k xxx -q xxx',
|
||||
)
|
||||
|
||||
def test_conflict_options():
|
||||
@@ -95,7 +96,18 @@ class TestKeywordSelection:
|
||||
assert len(l) == 1
|
||||
assert l[0][0].name == 'test_2'
|
||||
l = session.getitemoutcomepairs(Skipped)
|
||||
assert l[0][0].name == 'test_1'
|
||||
assert l[0][0].name == 'test_1'
|
||||
|
||||
def test_select_starton(self):
|
||||
config = py.test.config._reparse([datadir/'testmore.py',
|
||||
'-q', "test_two"])
|
||||
session = config._getsessionclass()(config, py.std.sys.stdout)
|
||||
session.main()
|
||||
l = session.getitemoutcomepairs(Passed)
|
||||
assert len(l) == 2
|
||||
l = session.getitemoutcomepairs(Skipped)
|
||||
assert len(l) == 1
|
||||
|
||||
|
||||
class TestTerminalSession:
|
||||
def mainsession(self, *args):
|
||||
|
||||
Reference in New Issue
Block a user