Python 3 compatibility

This commit is contained in:
Dave Halter
2014-05-05 11:56:41 +02:00
parent 61e1f46626
commit 4e9aa671a7

View File

@@ -16,7 +16,7 @@ class IntegrationTestFile(object):
def run(self): def run(self):
output = subprocess.check_output([VSPEC_RUNNER, '.', VSPEC_FOLDER, self.path]) output = subprocess.check_output([VSPEC_RUNNER, '.', VSPEC_FOLDER, self.path])
for line in output.splitlines(): for line in output.splitlines():
if line.startswith('not ok') or line.startswith('Error'): if line.startswith(b'not ok') or line.startswith(b'Error'):
print(output) print(output)
assert False assert False
@@ -42,7 +42,7 @@ def pytest_configure(config):
with open(dest, 'w') as f: with open(dest, 'w') as f:
f.write(data) f.write(data)
z.close() z.close()
os.chmod(VSPEC_RUNNER, 0777) os.chmod(VSPEC_RUNNER, 0o777)
def pytest_generate_tests(metafunc): def pytest_generate_tests(metafunc):