[Piglit] [PATCH 12/20] unittests: fix compressor tests that fails on windows
Dylan Baker
dylan at pnwbakers.com
Wed Jun 1 23:50:19 UTC 2016
These fail because they assumes that an xz binary is available, which is
probably not the case on windows. This splits the binary and module
tests, and makes the skipping actually work in all of the cases it needs
to (or at least more of the cases).
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
unittests/compressed_backend_tests.py | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/unittests/compressed_backend_tests.py b/unittests/compressed_backend_tests.py
index 80957e7..bf9af02 100644
--- a/unittests/compressed_backend_tests.py
+++ b/unittests/compressed_backend_tests.py
@@ -205,17 +205,37 @@ def test_bz2_output():
nt.eq_(_test_extension(), '.bz2')
+ at utils.nose.Skip.backport(3.0, 'backports.lzma')
@utils.nose.no_error
-def test_compress_xz():
- """framework.backends.compression: can compress to 'xz'"""
+def test_compress_xz_module():
+ """framework.backends.compression: can compress to 'xz' via module"""
_test_compressor('xz')
-def test_decompress_xz():
- """framework.backends.compression: can decompress from 'xz'"""
+ at utils.nose.Skip.py3
+ at utils.nose.Skip.module('backports.lzma', available=True)
+ at utils.nose.Skip.binary('xz')
+ at utils.nose.no_error
+def test_compress_xz_binary():
+ """framework.backends.compression: can compress to 'xz' via binary"""
+ _test_compressor('xz')
+
+
+ at utils.nose.Skip.backport(3.0, 'backports.lzma')
+def test_decompress_xz_module():
+ """framework.backends.compression: can decompress from 'xz' via module"""
+ _test_decompressor('xz')
+
+
+ at utils.nose.Skip.py3
+ at utils.nose.Skip.module('backports.lzma', available=True)
+ at utils.nose.Skip.binary('xz')
+def test_decompress_xz_binary():
+ """framework.backends.compression: can decompress from 'xz' via binary"""
_test_decompressor('xz')
+ at utils.nose.Skip.backport(3.0, 'backports.lzma')
@mock.patch.dict('os.environ', {'PIGLIT_COMPRESSION': 'xz'})
def test_xz_output():
"""framework.backends: when using xz compression a xz file is created"""
--
2.8.3
More information about the Piglit
mailing list