Commit b72ad318 authored by Yannick DAYER's avatar Yannick DAYER

Remove vuln tests and error_utils functions

parent 03cd49a9
Pipeline #49193 passed with stage
in 7 minutes and 56 seconds
This diff is collapsed.
from click.testing import CliRunner from click.testing import CliRunner
import pkg_resources import pkg_resources
from ..script import (pad_commands, vuln_commands) from ..script import pad_commands
from bob.extension.scripts.click_helper import assert_click_runner_result from bob.extension.scripts.click_helper import assert_click_runner_result
...@@ -17,49 +17,6 @@ def test_det_pad(): ...@@ -17,49 +17,6 @@ def test_det_pad():
assert_click_runner_result(result) assert_click_runner_result(result)
def test_det_vuln():
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')
runner = CliRunner()
with runner.isolated_filesystem():
result = runner.invoke(vuln_commands.det, ['-fnmr', '0.2',
'-o',
'DET.pdf',
licit_dev, licit_test,
spoof_dev, spoof_test])
assert_click_runner_result(result)
def test_fmr_iapmr_vuln():
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')
runner = CliRunner()
with runner.isolated_filesystem():
result = runner.invoke(vuln_commands.fmr_iapmr, [
'--output', 'FMRIAPMR.pdf', licit_dev, licit_test, spoof_dev,
spoof_test
])
assert_click_runner_result(result)
result = runner.invoke(vuln_commands.fmr_iapmr, [
'--output', 'FMRIAPMR.pdf', licit_dev, licit_test, spoof_dev,
spoof_test, '-G', '-L', '1e-7,1,0,1'
])
assert_click_runner_result(result)
def test_hist_pad(): def test_hist_pad():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test', licit_dev = pkg_resources.resource_filename('bob.pad.base.test',
'data/licit/scores-dev') 'data/licit/scores-dev')
...@@ -91,32 +48,6 @@ def test_hist_pad(): ...@@ -91,32 +48,6 @@ def test_hist_pad():
assert_click_runner_result(result) assert_click_runner_result(result)
def test_hist_vuln():
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')
runner = CliRunner()
with runner.isolated_filesystem():
result = runner.invoke(vuln_commands.hist,
['--criterion', 'eer', '--output',
'HISTO.pdf', '-b', '30', '-ts', 'A,B',
licit_dev, licit_test])
assert_click_runner_result(result)
with runner.isolated_filesystem():
result = runner.invoke(vuln_commands.hist,
['--criterion', 'eer', '--output',
'HISTO.pdf', '-b', '2,20,30', '-e',
licit_dev, licit_test,
spoof_dev, spoof_test])
assert_click_runner_result(result)
def test_metrics_pad(): def test_metrics_pad():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test', licit_dev = pkg_resources.resource_filename('bob.pad.base.test',
'data/licit/scores-dev') 'data/licit/scores-dev')
...@@ -131,79 +62,6 @@ def test_metrics_pad(): ...@@ -131,79 +62,6 @@ def test_metrics_pad():
assert_click_runner_result(result) assert_click_runner_result(result)
def test_epc_vuln():
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')
runner = CliRunner()
with runner.isolated_filesystem():
result = runner.invoke(vuln_commands.epc,
['--output', 'epc.pdf',
licit_dev, licit_test,
spoof_dev, spoof_test])
assert_click_runner_result(result)
result = runner.invoke(vuln_commands.epc,
['--output', 'epc.pdf', '-I',
licit_dev, licit_test,
spoof_dev, spoof_test])
assert_click_runner_result(result)
def test_epsc_vuln():
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')
runner = CliRunner()
with runner.isolated_filesystem():
result = runner.invoke(vuln_commands.epsc,
['--output', 'epsc.pdf',
licit_dev, licit_test,
spoof_dev, spoof_test])
assert_click_runner_result(result)
result = runner.invoke(vuln_commands.epsc,
['--output', 'epsc.pdf', '-I',
'-fp', '0.1,0.3',
licit_dev, licit_test,
spoof_dev, spoof_test])
assert_click_runner_result(result)
def test_epsc_3D_vuln():
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')
runner = CliRunner()
with runner.isolated_filesystem():
result = runner.invoke(vuln_commands.epsc,
['--output', 'epsc.pdf', '-D',
licit_dev, licit_test,
spoof_dev, spoof_test])
assert_click_runner_result(result)
result = runner.invoke(vuln_commands.epsc,
['--output', 'epsc.pdf', '-D',
'-I', '--no-wer',
licit_dev, licit_test,
spoof_dev, spoof_test])
assert_click_runner_result(result)
def test_evaluate_pad(): def test_evaluate_pad():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test', licit_dev = pkg_resources.resource_filename('bob.pad.base.test',
'data/licit/scores-dev') 'data/licit/scores-dev')
......
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