diff --git a/IPython/testing/decorators.py b/IPython/testing/decorators.py index 2430dcf7d67..8170730c47a 100644 --- a/IPython/testing/decorators.py +++ b/IPython/testing/decorators.py @@ -297,7 +297,7 @@ def module_not_available(module): # Decorators to skip certain tests on specific platforms. skip_win32 = skipif(sys.platform == 'win32', "This test does not run under Windows") -skip_linux = skipif(sys.platform == 'linux2', +skip_linux = skipif(sys.platform.startswith('linux'), "This test does not run under Linux") skip_osx = skipif(sys.platform == 'darwin',"This test does not run under OS X") @@ -305,7 +305,7 @@ def module_not_available(module): # Decorators to skip tests if not on specific platforms. skip_if_not_win32 = skipif(sys.platform != 'win32', "This test only runs under Windows") -skip_if_not_linux = skipif(sys.platform != 'linux2', +skip_if_not_linux = skipif(not sys.platform.startswith('linux'), "This test only runs under Linux") skip_if_not_osx = skipif(sys.platform != 'darwin', "This test only runs under OSX") diff --git a/IPython/testing/tests/test_decorators.py b/IPython/testing/tests/test_decorators.py index f45c3dddac9..5ce0a6bbcc9 100644 --- a/IPython/testing/tests/test_decorators.py +++ b/IPython/testing/tests/test_decorators.py @@ -176,7 +176,7 @@ def test_skip_dt_decorator2(): @dec.skip_linux def test_linux(): - nt.assert_not_equals(sys.platform,'linux2',"This test can't run under linux") + nt.assert_false(sys.platform.startswith('linux'),"This test can't run under linux") @dec.skip_win32 def test_win32():