Replaced tests/tests_data hardcoded to Path(__file__).parent

This commit is contained in:
Ruben Sanchez 2023-11-28 13:28:26 -05:00
parent 01e85bd38c
commit ba2a9a76fd
2 changed files with 4 additions and 4 deletions

View File

@ -71,8 +71,8 @@ class Control:
CityObject.__table__.create(bind=repository.engine, checkfirst=True) CityObject.__table__.create(bind=repository.engine, checkfirst=True)
SimulationResults.__table__.create(bind=repository.engine, checkfirst=True) SimulationResults.__table__.create(bind=repository.engine, checkfirst=True)
city_file = Path('tests/tests_data/test.geojson').resolve() city_file = (Path(__file__).parent / 'tests_data/test.geojson').resolve()
output_path = Path('tests/tests_outputs/').resolve() output_path = (Path(__file__).parent / 'tests_output').resolve()
self._city = GeometryFactory('geojson', self._city = GeometryFactory('geojson',
city_file, city_file,
height_field='citygml_me', 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._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 @property
def database(self): def database(self):

View File

@ -57,7 +57,7 @@ class Control:
self._application_uuid = '60b7fc1b-f389-4254-9ffd-22a4cf32c7a3' self._application_uuid = '60b7fc1b-f389-4254-9ffd-22a4cf32c7a3'
self._application_id = 1 self._application_id = 1
self._user_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 @property
def database(self): def database(self):