From ba2a9a76fdf07be76fd6392613a70fee3c98316c Mon Sep 17 00:00:00 2001 From: Ruben Sanchez Date: Tue, 28 Nov 2023 13:28:26 -0500 Subject: [PATCH] Replaced tests/tests_data hardcoded to Path(__file__).parent --- tests/test_db_factory.py | 6 +++--- tests/test_db_retrieve.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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):