Commit 955e102d authored by Yannick DAYER's avatar Yannick DAYER

Change the tests score files input to CSV scores.

parent 75ef5aab
Pipeline #51452 failed with stage
in 12 minutes and 42 seconds
...@@ -43,74 +43,78 @@ def test_gen_pad(): ...@@ -43,74 +43,78 @@ def test_gen_pad():
def test_det_pad(): def test_det_pad():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test', dev = pkg_resources.resource_filename(
'data/licit/scores-dev') "bob.pad.base.test", "data/csv_scores/scores-dev.csv"
licit_test = pkg_resources.resource_filename('bob.pad.base.test', )
'data/licit/scores-eval') test = pkg_resources.resource_filename(
"bob.pad.base.test", "data/csv_scores/scores-eval.csv"
)
runner = CliRunner() runner = CliRunner()
with runner.isolated_filesystem(): with runner.isolated_filesystem():
result = runner.invoke(pad_commands.det, ['-e', '--output', result = runner.invoke(
'DET.pdf', pad_commands.det, ["-e", "--output", "DET.pdf", dev, test]
licit_dev, licit_test]) )
assert_click_runner_result(result) assert_click_runner_result(result)
def test_hist_pad(): def test_hist_pad():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test', dev = pkg_resources.resource_filename(
'data/licit/scores-dev') "bob.pad.base.test", "data/csv_scores/scores-dev.csv"
licit_test = pkg_resources.resource_filename('bob.pad.base.test', )
'data/licit/scores-eval') test = pkg_resources.resource_filename(
spoof_dev = pkg_resources.resource_filename('bob.pad.base.test', "bob.pad.base.test", "data/csv_scores/scores-eval.csv"
'data/spoof/scores-dev') )
spoof_test = pkg_resources.resource_filename('bob.pad.base.test',
'data/spoof/scores-eval')
runner = CliRunner() runner = CliRunner()
with runner.isolated_filesystem(): with runner.isolated_filesystem():
result = runner.invoke(pad_commands.hist, [licit_dev]) result = runner.invoke(pad_commands.hist, [dev])
assert_click_runner_result(result) assert_click_runner_result(result)
with runner.isolated_filesystem(): with runner.isolated_filesystem():
result = runner.invoke(pad_commands.hist, ['--criterion', 'min-hter', result = runner.invoke(
'--output', pad_commands.hist,
'HISTO.pdf', '-b', ["--criterion", "min-hter", "--output", "HISTO.pdf", "-b", "30,20", dev],
'30,20', )
licit_dev, spoof_dev])
assert_click_runner_result(result) assert_click_runner_result(result)
with runner.isolated_filesystem(): with runner.isolated_filesystem():
result = runner.invoke(pad_commands.hist, ['-e', '--criterion', 'eer', result = runner.invoke(
'--output', pad_commands.hist,
'HISTO.pdf', '-b', '30', [
licit_dev, licit_test, "-e",
spoof_dev, spoof_test]) "--criterion",
"eer",
"--output",
"HISTO.pdf",
"-b",
"30",
dev,
test,
],
)
assert_click_runner_result(result) assert_click_runner_result(result)
def test_metrics_pad(): def test_metrics_pad():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test', dev = pkg_resources.resource_filename(
'data/licit/scores-dev') "bob.pad.base.test", "data/csv_scores/scores-dev.csv"
licit_test = pkg_resources.resource_filename('bob.pad.base.test', )
'data/licit/scores-eval') test = pkg_resources.resource_filename(
"bob.pad.base.test", "data/csv_scores/scores-eval.csv"
)
runner = CliRunner() runner = CliRunner()
with runner.isolated_filesystem(): with runner.isolated_filesystem():
result = runner.invoke( result = runner.invoke(pad_commands.metrics, ["-e", dev, test, "-vvv"])
pad_commands.metrics,
['-e', licit_dev, licit_test]
)
assert_click_runner_result(result) assert_click_runner_result(result)
def test_evaluate_pad(): def test_evaluate_pad():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test', dev = pkg_resources.resource_filename(
'data/licit/scores-dev') "bob.pad.base.test", "data/csv_scores/scores-dev.csv"
licit_test = pkg_resources.resource_filename('bob.pad.base.test', )
'data/licit/scores-eval') test = pkg_resources.resource_filename(
spoof_dev = pkg_resources.resource_filename('bob.pad.base.test', "bob.pad.base.test", "data/csv_scores/scores-eval.csv"
'data/spoof/scores-dev') )
spoof_test = pkg_resources.resource_filename('bob.pad.base.test',
'data/spoof/scores-eval')
runner = CliRunner() runner = CliRunner()
with runner.isolated_filesystem(): with runner.isolated_filesystem():
result = runner.invoke(pad_commands.evaluate, result = runner.invoke(pad_commands.evaluate, [dev, test])
[licit_dev, licit_test, spoof_dev, spoof_test])
assert_click_runner_result(result) assert_click_runner_result(result)
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