Merge remote-tracking branch 'upstream/master' into Corni/loadfilescope
This commit is contained in:
@@ -755,9 +755,9 @@ def test_worker_id_fixture(testdir, n):
|
||||
with open(fname) as f:
|
||||
worker_ids.add(f.read().strip())
|
||||
if n == 0:
|
||||
assert worker_ids == set(['master'])
|
||||
assert worker_ids == {'master'}
|
||||
else:
|
||||
assert worker_ids == set(['gw0', 'gw1'])
|
||||
assert worker_ids == {'gw0', 'gw1'}
|
||||
|
||||
|
||||
@pytest.mark.parametrize('tb',
|
||||
@@ -915,7 +915,13 @@ def parse_tests_and_workers_from_output(lines):
|
||||
result = []
|
||||
for line in lines:
|
||||
# example match: "[gw0] PASSED test_a.py::test[7]"
|
||||
m = re.match(r'\[(gw\d)\]\s(.*?)\s(.*::.*)', line.strip())
|
||||
m = re.match(r'''
|
||||
\[(gw\d)\] # worker
|
||||
\s*
|
||||
(?:\[\s*\d+%\])? # progress indicator (pytest >=3.3)
|
||||
\s(.*?) # status string ("PASSED")
|
||||
\s(.*::.*) # nodeid
|
||||
''', line.strip(), re.VERBOSE)
|
||||
if m:
|
||||
worker, status, nodeid = m.groups()
|
||||
result.append((worker, status, nodeid))
|
||||
|
||||
@@ -34,7 +34,7 @@ def pytest_addoption(parser):
|
||||
parser.addoption('--gx',
|
||||
action="append",
|
||||
dest="gspecs",
|
||||
help=("add a global test environment, XSpec-syntax. "))
|
||||
help="add a global test environment, XSpec-syntax. ")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
@@ -126,7 +126,7 @@ class TestLoadScheduling:
|
||||
sched.add_node(MockNode())
|
||||
sched.add_node(MockNode())
|
||||
node1, node2 = sched.nodes
|
||||
col = ["xyz"] * (6)
|
||||
col = ["xyz"] * 6
|
||||
sched.add_node_collection(node1, col)
|
||||
sched.add_node_collection(node2, col)
|
||||
sched.schedule()
|
||||
|
||||
Reference in New Issue
Block a user