From 4ce6607917528f19bb1d704e9f00e5b9a16fbaae Mon Sep 17 00:00:00 2001 From: Thiago Crepaldi Date: Fri, 10 Aug 2018 17:05:23 -0700 Subject: [PATCH 1/2] Disable fmeasure test and increase pytest verbosity --- bindings/python/cntk/losses/tests/fmeasure_test.py | 4 +++- bindings/python/cntk/pytest.ini | 1 + bindings/python/doc/pytest.ini | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bindings/python/cntk/losses/tests/fmeasure_test.py b/bindings/python/cntk/losses/tests/fmeasure_test.py index 0c0ea0746..1498f2558 100644 --- a/bindings/python/cntk/losses/tests/fmeasure_test.py +++ b/bindings/python/cntk/losses/tests/fmeasure_test.py @@ -12,7 +12,9 @@ import numpy as np import cntk as C from _cntk_py import set_fixed_random_seed - +import pytest +from os import environ +@pytest.mark.skipif(environ['TEST_TAG'] in {'weekly', 'nightly'}, reason="Temporarily disabled this test in the Nightly/Weekly builds due to random failures.") def test_fmeasure(): a = np.array([[[[1., 1., 1., 0., 0.], [1., 1., 1., 0., 0.], diff --git a/bindings/python/cntk/pytest.ini b/bindings/python/cntk/pytest.ini index 978637708..0da4ed1ad 100644 --- a/bindings/python/cntk/pytest.ini +++ b/bindings/python/cntk/pytest.ini @@ -2,4 +2,5 @@ python_files = *.py python_classes = *Test #addopts = --doctest-modules +addopts = --verbose --full-trace doctest_optionflags= NORMALIZE_WHITESPACE diff --git a/bindings/python/doc/pytest.ini b/bindings/python/doc/pytest.ini index 5ca50a56e..8b85314b1 100644 --- a/bindings/python/doc/pytest.ini +++ b/bindings/python/doc/pytest.ini @@ -1,2 +1,2 @@ [pytest] -addopts = --doctest-modules --doctest-glob=*.rst +addopts = --verbose --full-trace --doctest-modules --doctest-glob=*.rst From b689ebb5ad17463cbcb67425e61c959a31ca954b Mon Sep 17 00:00:00 2001 From: Thiago Crepaldi Date: Mon, 13 Aug 2018 09:02:01 -0700 Subject: [PATCH 2/2] Ignore TEST_TAG environment variable when not defined during testing --- bindings/python/cntk/losses/tests/fmeasure_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/cntk/losses/tests/fmeasure_test.py b/bindings/python/cntk/losses/tests/fmeasure_test.py index 1498f2558..6a9a56761 100644 --- a/bindings/python/cntk/losses/tests/fmeasure_test.py +++ b/bindings/python/cntk/losses/tests/fmeasure_test.py @@ -14,7 +14,7 @@ from _cntk_py import set_fixed_random_seed import pytest from os import environ -@pytest.mark.skipif(environ['TEST_TAG'] in {'weekly', 'nightly'}, reason="Temporarily disabled this test in the Nightly/Weekly builds due to random failures.") +@pytest.mark.skipif(environ.get('TEST_TAG') is not None and environ['TEST_TAG'] in {'weekly', 'nightly'}, reason="Temporarily disabled this test in the Nightly/Weekly builds due to random failures.") def test_fmeasure(): a = np.array([[[[1., 1., 1., 0., 0.], [1., 1., 1., 0., 0.],