conftest.py 428 B

1234567891011121314
  1. import subprocess
  2. import os
  3. import pytest
  4. import rostest
  5. @pytest.fixture(scope="session", autouse=True)
  6. def chdir_to_project_root():
  7. os.chdir(os.path.join(os.path.dirname(rostest.__file__), '../../..'))
  8. print('\nChdir to project root dir: ' + subprocess.check_output('pwd'))
  9. os.chmod('./tests/integration/assets/test.key', 0o600)
  10. print('Also, `chmod 600 tests/integration/assets/test.key` to make ssh happy')