File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
from __future__ import absolute_import
2
- import sys
2
+ import os
3
3
4
- on_windows = sys . platform . startswith ( "win" )
4
+ on_windows = os . name == 'nt'
5
5
6
6
# The order of imports matters!
7
7
from .actions import Actions , flip_action
Original file line number Diff line number Diff line change 1
1
import unittest
2
- import sys
2
+ import os
3
3
import axelrod
4
4
5
5
class TestWindowsDetection (unittest .TestCase ):
6
6
7
- @unittest .skipIf (sys . platform . startswith ( "win" ) ,
7
+ @unittest .skipIf (os . name == 'nt' ,
8
8
"Skip this test if on windows" )
9
9
def test_detection_on_not_windows (self ):
10
10
"""Test when not on windows"""
11
11
self .assertFalse (axelrod .on_windows )
12
12
13
- @unittest .skipIf (not sys . platform . startswith ( "win" ) ,
13
+ @unittest .skipIf (os . name != 'nt' ,
14
14
"Skip this test if not on windows" )
15
15
def test_detection_on_not_windows (self ):
16
16
"""Test when on windows"""
You can’t perform that action at this time.
0 commit comments