Skip to content
Snippets Groups Projects

Fixing build

Merged Daniel Lyons requested to merge fixing-build into 2.8.2-DEVELOPMENT
4 files
+ 100
59
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -36,29 +36,25 @@ def test_gets_eb_as_expected():
:return:
"""
sys.argv.append("-e")
sys.argv.append("21A-409.sb39530397.eb39561636.59309.07888592593")
with patch("sys.stdout", new=StringIO()) as fake_out:
main()
output = fake_out.getvalue()
rows = output.split("\n")
with patch("sys.argv", ["core_sampler", "-e", "21A-409.sb39530397.eb39561636.59309.07888592593"]):
with patch("sys.stdout", new=StringIO()) as fake_out:
main()
output = fake_out.getvalue()
rows = output.split("\n")
found = False
for row in rows:
if "156759763" in row and "23142018" in row:
found = True
break
assert found
found = False
for row in rows:
if "156759763" in row and "23142018" in row:
found = True
break
assert found
if len(rows) == 181:
# sometimes we get an extra blank line
assert len(rows[-1]) == 0
else:
assert len(rows) == 180
sys.argv.pop()
sys.argv.pop()
if len(rows) == 181:
# sometimes we get an extra blank line
assert len(rows[-1]) == 0
else:
assert len(rows) == 180
def test_gets_project_as_expected():
@@ -67,24 +63,20 @@ def test_gets_project_as_expected():
:return:
"""
sys.argv.append("-p")
sys.argv.append("20A-465")
with patch("sys.stdout", new=StringIO()) as fake_out:
main()
output = fake_out.getvalue()
rows = output.split("\n")
if len(rows) == 705:
# sometimes we get an extra blank line
assert len(rows[-1]) == 0
else:
assert len(rows) == 704
found = False
for row in rows:
if "uid____evla_bdf_1589728351957.bdf" in row and "121847" in row:
found = True
break
assert found
sys.argv.pop()
sys.argv.pop()
with patch("sys.argv", ["core_sampler", "-p", "20A-465"]):
with patch("sys.stdout", new=StringIO()) as fake_out:
main()
output = fake_out.getvalue()
rows = output.split("\n")
if len(rows) == 705:
# sometimes we get an extra blank line
assert len(rows[-1]) == 0
else:
assert len(rows) == 704
found = False
for row in rows:
if "uid____evla_bdf_1589728351957.bdf" in row and "121847" in row:
found = True
break
assert found
Loading