Skip to content

Commit

Permalink
stop saving output test data to dir_input
Browse files Browse the repository at this point in the history
  • Loading branch information
bbean23 committed Apr 6, 2024
1 parent 4b616de commit a320f88
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions opencsp/app/scene_reconstruction/test/test_SceneReconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ def setUpClass(cls, dir_input: str = None, dir_output: str = None):
base_dir = dirname(__file__)
dir_input = join(base_dir, 'data', 'data_measurement')
dir_output = join(base_dir, 'data', 'data_expected')
ft.create_directories_if_necessary(dir_input)
ft.create_directories_if_necessary(dir_output)

path, _, _ = ft.path_components(__file__)
cls.out_dir = join(path, "data", "output", "ImageAcquisitionAbstract")
ft.create_directories_if_necessary(cls.out_dir)

# Load components
camera = Camera.load_from_hdf(join(dir_input, 'camera.h5'))
Expand Down Expand Up @@ -88,13 +94,12 @@ def test_calibrated_corner_locations(self):

def test_save_csv(self):
"""Saves CSV file of points to data location"""
base_dir = dirname(__file__)
file = join(base_dir, 'data/data_expected/point_locations.csv')
file = join(self.out_dir, 'point_locations.csv')
self.scene_recon.save_data_as_csv(file)


if __name__ == '__main__':
save_path = join(dirname(__file__), 'data/output')
ft.create_directories_if_necessary(save_path)
lt.logger(join(save_path, 'log_scene_reconstruction'), lt.log.WARN)
tsr = TestSceneReconstruction()
tsr.setUpClass()
lt.logger(join(tsr.out_dir, 'log_scene_reconstruction'), lt.log.WARN)
unittest.main()

0 comments on commit a320f88

Please sign in to comment.