From 17b263106d561f805269f73adb6adf8ba615a431 Mon Sep 17 00:00:00 2001 From: Stuart Prescott Date: Wed, 25 Sep 2019 01:02:15 +1000 Subject: [PATCH] Allow tests to be skipped from environment NeXus is not compatible with the current version of MXML, so allow tests to be skipped. --- nxs/test/napi/test_file_creation.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nxs/test/napi/test_file_creation.py b/nxs/test/napi/test_file_creation.py index b9212c0..45fd02a 100644 --- a/nxs/test/napi/test_file_creation.py +++ b/nxs/test/napi/test_file_creation.py @@ -19,14 +19,20 @@ class test_file_creation(unittest.TestCase): + @unittest.skipIf('SKIP_NXS_TESTS_HDF5' in os.environ, + "HDF5 tests disabled in environment") def test_hdf5(self): f = napi.open("test_hdf5.nxs","w5") os.remove("test_hdf5.nxs") + @unittest.skipIf('SKIP_NXS_TESTS_HDF4' in os.environ, + "HDF4 tests disabled in environment") def test_hdf4(self): f = napi.open("test_hdf4.nxs","w4") os.remove("test_hdf4.nxs") + @unittest.skipIf('SKIP_NXS_TESTS_MXML' in os.environ, + "MXML tests disabled in environment") def test_mxml(self): f = napi.open("test_mxml.nxs","wx")