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():
def test_det_pad():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test',
'data/licit/scores-dev')
licit_test = pkg_resources.resource_filename('bob.pad.base.test',
'data/licit/scores-eval')
dev = pkg_resources.resource_filename(
"bob.pad.base.test", "data/csv_scores/scores-dev.csv"
)
test = pkg_resources.resource_filename(
"bob.pad.base.test", "data/csv_scores/scores-eval.csv"
)
runner = CliRunner()
with runner.isolated_filesystem():
result = runner.invoke(pad_commands.det, ['-e', '--output',
'DET.pdf',
licit_dev, licit_test])
result = runner.invoke(
pad_commands.det, ["-e", "--output", "DET.pdf", dev, test]
)
assert_click_runner_result(result)
def test_hist_pad():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test',
'data/licit/scores-dev')
licit_test = pkg_resources.resource_filename('bob.pad.base.test',
'data/licit/scores-eval')
spoof_dev = pkg_resources.resource_filename('bob.pad.base.test',
'data/spoof/scores-dev')
spoof_test = pkg_resources.resource_filename('bob.pad.base.test',
'data/spoof/scores-eval')
dev = pkg_resources.resource_filename(
"bob.pad.base.test", "data/csv_scores/scores-dev.csv"
)
test = pkg_resources.resource_filename(
"bob.pad.base.test", "data/csv_scores/scores-eval.csv"
)
runner = CliRunner()
with runner.isolated_filesystem():
result = runner.invoke(pad_commands.hist, [licit_dev])
result = runner.invoke(pad_commands.hist, [dev])
assert_click_runner_result(result)
with runner.isolated_filesystem():
result = runner.invoke(pad_commands.hist, ['--criterion', 'min-hter',
'--output',
'HISTO.pdf', '-b',
'30,20',
licit_dev, spoof_dev])
result = runner.invoke(
pad_commands.hist,
["--criterion", "min-hter", "--output", "HISTO.pdf", "-b", "30,20", dev],
)
assert_click_runner_result(result)
with runner.isolated_filesystem():
result = runner.invoke(pad_commands.hist, ['-e', '--criterion', 'eer',
'--output',
'HISTO.pdf', '-b', '30',
licit_dev, licit_test,
spoof_dev, spoof_test])
result = runner.invoke(
pad_commands.hist,
[
"-e",
"--criterion",
"eer",
"--output",
"HISTO.pdf",
"-b",
"30",
dev,
test,
],
)
assert_click_runner_result(result)
def test_metrics_pad():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test',
'data/licit/scores-dev')
licit_test = pkg_resources.resource_filename('bob.pad.base.test',
'data/licit/scores-eval')
dev = pkg_resources.resource_filename(
"bob.pad.base.test", "data/csv_scores/scores-dev.csv"
)
test = pkg_resources.resource_filename(
"bob.pad.base.test", "data/csv_scores/scores-eval.csv"
)
runner = CliRunner()
with runner.isolated_filesystem():
result = runner.invoke(
pad_commands.metrics,
['-e', licit_dev, licit_test]
)
result = runner.invoke(pad_commands.metrics, ["-e", dev, test, "-vvv"])
assert_click_runner_result(result)
def test_evaluate_pad():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test',
'data/licit/scores-dev')
licit_test = pkg_resources.resource_filename('bob.pad.base.test',
'data/licit/scores-eval')
spoof_dev = pkg_resources.resource_filename('bob.pad.base.test',
'data/spoof/scores-dev')
spoof_test = pkg_resources.resource_filename('bob.pad.base.test',
'data/spoof/scores-eval')
dev = pkg_resources.resource_filename(
"bob.pad.base.test", "data/csv_scores/scores-dev.csv"
)
test = pkg_resources.resource_filename(
"bob.pad.base.test", "data/csv_scores/scores-eval.csv"
)
runner = CliRunner()
with runner.isolated_filesystem():
result = runner.invoke(pad_commands.evaluate,
[licit_dev, licit_test, spoof_dev, spoof_test])
result = runner.invoke(pad_commands.evaluate, [dev, test])
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