tests: Use a portable /dev/null file name

Bug: https://github.com/Telecominfraproject/oopt-gnpy/issues/358
Change-Id: Icbca94682ce0ded860ba6397e4445651b6a61f32
This commit is contained in:
Jan Kundrát
2021-06-15 13:30:54 +02:00
parent 3fa53adc4d
commit 797a0856ec

View File

@@ -39,7 +39,7 @@ def test_run_wrapper(program):
def test_conversion_xls():
proc = subprocess.run(
('gnpy-convert-xls', SRC_ROOT / 'tests' / 'data' / 'testTopology.xls', '--output', '/dev/null'),
('gnpy-convert-xls', SRC_ROOT / 'tests' / 'data' / 'testTopology.xls', '--output', os.path.devnull),
stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True, universal_newlines=True)
assert proc.stderr == ''
assert '/dev/null' in proc.stdout
assert os.path.devnull in proc.stdout