diff --git a/tests/test_db_factory.py b/tests/test_db_factory.py index a91a0c2..2978d92 100644 --- a/tests/test_db_factory.py +++ b/tests/test_db_factory.py @@ -71,8 +71,8 @@ class Control: CityObject.__table__.create(bind=repository.engine, checkfirst=True) SimulationResults.__table__.create(bind=repository.engine, checkfirst=True) - city_file = Path('tests/tests_data/test.geojson').resolve() - output_path = Path('tests/tests_outputs/').resolve() + city_file = (Path(__file__).parent / 'tests_data/test.geojson').resolve() + output_path = (Path(__file__).parent / 'tests_output').resolve() self._city = GeometryFactory('geojson', city_file, height_field='citygml_me', @@ -114,7 +114,7 @@ class Control: ) self._user_id = self._database.create_user('test', self._application_id, 'test', UserRoles.Admin) - self._pickle_path = Path('tests/tests_data/pickle_path.bz2').resolve() + self._pickle_path = (Path(__file__).parent / 'tests_data/pickle_path.bz2').resolve() @property def database(self): diff --git a/tests/test_db_retrieve.py b/tests/test_db_retrieve.py index 4795b2e..25fdb56 100644 --- a/tests/test_db_retrieve.py +++ b/tests/test_db_retrieve.py @@ -57,7 +57,7 @@ class Control: self._application_uuid = '60b7fc1b-f389-4254-9ffd-22a4cf32c7a3' self._application_id = 1 self._user_id = 1 - self._pickle_path = 'tests/tests_data/pickle_path.bz2' + self._pickle_path = (Path(__file__).parent / 'tests_data/pickle_path.bz2').resolve() @property def database(self):