Support evaluation-local configuration and names overrides
This commit is contained in:
1 parent
0bb6f7d97c
commit
d4404e4c27
36 files changed
+409
-184
No files matched your search
@@ -44,7 +44,7 @@ class AddFinalScoreTests(unittest.TestCase):
|
||||
merged.write_bytes(b'merged')
|
||||
output = root / 'output'
|
||||
output.mkdir()
|
||||
with patch.object(add_final_score, 'HISTOGRAM_PATH', histogram):
|
||||
with patch.object(add_final_score.configuration, 'FINAL_SCORE_HISTOGRAM_PATH', histogram):
|
||||
add_final_score.copy_histogram(output)
|
||||
self.assertFalse((output / merged.name).exists())
|
||||
add_final_score.copy_histogram(output, copy_merged_histogramme=True)
|
||||
@@ -54,7 +54,7 @@ class AddFinalScoreTests(unittest.TestCase):
|
||||
def test_cli_forwards_merged_histogram_option(self):
|
||||
with tempfile.TemporaryDirectory() as temporary:
|
||||
root = Path(temporary)
|
||||
with patch.object(add_final_score, 'OUTPUT_DIR', root / 'output'), patch.object(
|
||||
with patch.object(add_final_score.configuration, 'FINAL_SCORE_OUTPUT_DIR', root / 'output'), patch.object(
|
||||
add_final_score, 'process_images'
|
||||
) as process:
|
||||
self.assertEqual(add_final_score.main([str(root), '--copy-merged-histogramme']), 0)
|
||||
@@ -83,7 +83,7 @@ class AddFinalScoreTests(unittest.TestCase):
|
||||
histogram = root / "histogramme.pdf"
|
||||
histogram.write_bytes(b"histogram")
|
||||
with patch.object(add_final_score.pd, "read_excel", return_value=scores), \
|
||||
patch.object(add_final_score, "HISTOGRAM_PATH", histogram), \
|
||||
patch.object(add_final_score.configuration, "FINAL_SCORE_HISTOGRAM_PATH", histogram), \
|
||||
contextlib.redirect_stdout(io.StringIO()):
|
||||
add_final_score.process_images(root, output)
|
||||
|
||||
@@ -137,7 +137,7 @@ class AddFinalScoreTests(unittest.TestCase):
|
||||
with patch.object(
|
||||
add_final_score.pd, "read_excel", return_value=scores
|
||||
), patch.object(
|
||||
add_final_score, "HISTOGRAM_PATH", root / "missing.pdf"
|
||||
add_final_score.configuration, "FINAL_SCORE_HISTOGRAM_PATH", root / "missing.pdf"
|
||||
), contextlib.redirect_stdout(messages):
|
||||
add_final_score.process_images(root, output)
|
||||
|
||||
|
||||
Reference in new issue
Block a user