From 08bc7afe872dc7f5087134c1edab51762743cef4 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Tue, 18 Apr 2017 17:45:50 +0100 Subject: [PATCH] Fix to fixlabels test. New async test - making sure idleTimeout can be changed --- tests/test_async.py | 9 +++++++++ tests/test_fixlabels.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/test_async.py b/tests/test_async.py index 5b1d8abf4..9d96801c8 100644 --- a/tests/test_async.py +++ b/tests/test_async.py @@ -123,6 +123,15 @@ def _test_run(): assert onErrorCalled[ 0] +def test_idleTimeout(): + async.idleReset() + default = async.getIdleTimeout() + async.setIdleTimeout(999) + assert async.getIdleTimeout() == 999 + async.setIdleTimeout() + assert async.getIdleTimeout() == default + + def test_idle(): called = [False] diff --git a/tests/test_fixlabels.py b/tests/test_fixlabels.py index 8f374fd58..f8d228ea5 100644 --- a/tests/test_fixlabels.py +++ b/tests/test_fixlabels.py @@ -340,7 +340,7 @@ def test_saveLabelFile(): # dirname=something, listBad=False dirname = 'Blob/a.ica' fixlabels.saveLabelFile(labels, fname, dirname=dirname, listBad=False) - exp = '{}\n{}'.format(op.abspath(dirname), expected) + exp = '{}\n{}'.format(dirname, expected) with open(fname, 'rt') as f: assert f.read().strip() == exp -- GitLab