Commit 331dcd15 authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME

Bug fix

parent cc0e5e86
Pipeline #19834 failed with stage
in 32 minutes
......@@ -426,11 +426,11 @@ class Epsc(PadPlot):
axis.spines['right'].set_color('red')
if self._var_param == 'omega':
if title.replace(' ', ''):
if title is not None and title.replace(' ', ''):
mpl.title(title or (r"EPSC with $\beta$ = %.2f" %\
self._fixed_param))
else:
if title.replace(' ', ''):
if title is not None and title.replace(' ', ''):
mpl.title(title or (r"EPSC with $\omega$ = %.2f" %\
self._fixed_param))
......@@ -455,7 +455,7 @@ class Epsc3D(Epsc):
spoof_eval_neg = input_scores[3][0]
spoof_eval_pos = input_scores[3][1]
title = self._legends[idx] if self._legends is not None else None
title = self._legends[idx] if self._legends is not None else "3D EPSC"
mpl.rcParams.pop('key', None)
......@@ -502,7 +502,7 @@ class Epsc3D(Epsc):
)
if title.replace(' ', ''):
mpl.title(title or "3D EPSC")
mpl.title(title)
ax1.set_xticklabels(ax1.get_xticks())
ax1.set_yticklabels(ax1.get_yticks())
......
......@@ -75,7 +75,7 @@ def test_hist():
spoof_dev, spoof_test])
assert result.exit_code == 0, (result.exit_code, result.output)
def test_vuln():
def test_vuln_hist():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test',
'data/licit/scores-dev')
licit_test = pkg_resources.resource_filename('bob.pad.base.test',
......@@ -86,12 +86,29 @@ def test_vuln():
'data/spoof/scores-eval')
runner = CliRunner()
with runner.isolated_filesystem():
result = runner.invoke(histograms.vuln, ['--criterion', 'eer', '--output',
result = runner.invoke(histograms.vuln_hist, ['--criterion', 'eer', '--output',
'HISTO.pdf', '-b', '30',
licit_dev, licit_test,
spoof_dev, spoof_test])
assert result.exit_code == 0, (result.exit_code, result.output)
def test_vuln_metrics():
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(
metrics.vuln_metrics,
['--criterion', 'eer', licit_dev, licit_test, spoof_dev, spoof_test]
)
assert result.exit_code == 0, (result.exit_code, result.output)
def test_epc():
licit_dev = pkg_resources.resource_filename('bob.pad.base.test',
'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