[svn r54623] A test for 54622
Fix for running tests --HG-- branch : trunk
This commit is contained in:
parent
6e99225320
commit
4fce886def
|
@ -33,7 +33,7 @@ def itemgen(session, colitems, reporter, keyword=None):
|
||||||
if isinstance(next, stopitems):
|
if isinstance(next, stopitems):
|
||||||
try:
|
try:
|
||||||
next._skipbykeyword(keyword)
|
next._skipbykeyword(keyword)
|
||||||
if session.config.option.keyword_oneshot:
|
if session and session.config.option.keyword_oneshot:
|
||||||
keyword = None
|
keyword = None
|
||||||
yield next
|
yield next
|
||||||
except Skipped:
|
except Skipped:
|
||||||
|
|
|
@ -91,6 +91,19 @@ namecontent = [
|
||||||
def test_three():
|
def test_three():
|
||||||
assert 1
|
assert 1
|
||||||
''')),
|
''')),
|
||||||
|
('testevenmore.py', py.code.Source('''
|
||||||
|
def test_one():
|
||||||
|
assert 1
|
||||||
|
|
||||||
|
def test_two():
|
||||||
|
assert 1
|
||||||
|
|
||||||
|
def test_three():
|
||||||
|
assert 1
|
||||||
|
|
||||||
|
def test_four():
|
||||||
|
assert 1
|
||||||
|
''')),
|
||||||
|
|
||||||
('testspecial_importerror.py', py.code.Source('''
|
('testspecial_importerror.py', py.code.Source('''
|
||||||
|
|
||||||
|
|
|
@ -118,13 +118,13 @@ class TestKeywordSelection:
|
||||||
assert l[0].item.name == 'test_1'
|
assert l[0].item.name == 'test_1'
|
||||||
|
|
||||||
def test_select_starton(self):
|
def test_select_starton(self):
|
||||||
config = py.test.config._reparse([datadir/'testmore.py',
|
config = py.test.config._reparse([datadir/'testevenmore.py',
|
||||||
'-j', '-k', "test_two"])
|
'-j', '-k', "test_three"])
|
||||||
all = []
|
all = []
|
||||||
session = config._getsessionclass()(config)
|
session = config._getsessionclass()(config)
|
||||||
session.main(all.append)
|
session.main(all.append)
|
||||||
assert len(getpassed(all)) == 2
|
assert len(getpassed(all)) == 2
|
||||||
assert len(getskipped(all)) == 1
|
assert len(getskipped(all)) == 2
|
||||||
|
|
||||||
|
|
||||||
class TestTerminalSession:
|
class TestTerminalSession:
|
||||||
|
|
Loading…
Reference in New Issue