Commit df30bea7 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Updated test scripts.

parent 60e3f492
Pipeline #595 failed with stages
in 1 minute and 10 seconds
......@@ -63,7 +63,7 @@ coverage: ## check code coverage quickly with the default Python
coverage combine # must be called in order to make coverage work in multiprocessing
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html
#$(BROWSER) htmlcov/index.html
docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/arosics.rst
......
......@@ -8,6 +8,7 @@ import unittest
import shutil
import os
# custom
from .cases import test_cases
from arosics import COREG
......@@ -86,7 +87,7 @@ class CompleteWorkflow_INTER1_S2A_S2A(unittest.TestCase):
footprint_poly_tgt=None))
self.assertTrue(CR.success)
#@unittest.SkipTest
def test_shift_calculation_verboseMode(self):
"""Test the verbose mode - runs the functions of the plotting submodule."""
......@@ -164,10 +165,10 @@ class CompleteWorkflow_INTER1_S2A_S2A(unittest.TestCase):
self.skipTest('Not yet implemented.')
def test_plotting_after_shift_calculation(self):
#@unittest.SkipTest
def test_plotting_after_shift_calculation(self, mock_show):
""""""
mock_show.return_value = None # probably not necessary here in your case
CR = self.run_shift_detection_correction(self.ref_path, self.tgt_path, **self.coreg_kwargs)
self.assertTrue(CR.success)
......@@ -179,3 +180,7 @@ class CompleteWorkflow_INTER1_S2A_S2A(unittest.TestCase):
# CR.show_matchWin(interactive=True) # only works if test is started with ipython
# CR.show_matchWin(interactive=False, deshifted=True)
CR.show_image_footprints()
#if __name__ == '__main__':
# unittest.main(argv=['first-arg-is-ignored'],exit=False, verbosity=2)
......@@ -56,6 +56,7 @@ class CompleteWorkflow_INTER1_S2A_S2A(unittest.TestCase):
if os.path.isdir(dir_out):
shutil.rmtree(dir_out)
def test_calculation_of_tie_point_grid(self):
# get instance of COREG_LOCAL object
CRL = COREG_LOCAL(self.ref_path, self.tgt_path, **self.coreg_kwargs)
......@@ -64,10 +65,20 @@ class CompleteWorkflow_INTER1_S2A_S2A(unittest.TestCase):
TPG = CRL.CoRegPoints_table
# test tie point grid visualization
CRL.view_CoRegPoints() # only works if basemap is installed
#CRL.view_CoRegPoints() # only works if basemap is installed
# test shift correction and output writer
CRL.correct_shifts()
self.assertTrue(os.path.exists(self.coreg_kwargs['path_out']),
'Output of local co-registration has not been written.')
#if __name__ == '__main__':
# unittest.main(argv=['first-arg-is-ignored'],exit=False, verbosity=2)
#
# suite = unittest.TestLoader().loadTestsFromTestCase(eval("CompleteWorkflow_INTER1_S2A_S2A"))
# alltests = unittest.TestSuite(suite)
#
# # Part 2: Saving the results of each testsuite and the query for the job.status in individual variables.
# testResult = unittest.TextTestRunner(verbosity=2).run(alltests)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment