Skip to content
Browse files

check linux with startswith('linux') instead of =='linux2'

This allows for sys.platform=='linux3'.

closes gh-549
  • Loading branch information...
1 parent 1f78d0e commit e1d1d8e8ddcf0bdc30db5107f9ff3bcbd52cc19e @minrk minrk committed Jun 30, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 IPython/testing/decorators.py
  2. +1 −1 IPython/testing/tests/test_decorators.py
View
4 IPython/testing/decorators.py
@@ -297,15 +297,15 @@ 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")
# 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")
View
2 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():

0 comments on commit e1d1d8e

Please sign in to comment.
Something went wrong with that request. Please try again.