File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
py_utils/test/py_utils/unittest/system Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change 1717"""
1818
1919import os
20+
2021from py_utils .system .system_utils import is_linux , is_windows
2122
2223
2324def test_is_linux ():
2425 # Test case 1: Running the script on a Linux system
2526 os .name = 'posix'
26- assert ( is_linux () is True )
27+ assert is_linux ()
2728
2829 # Test case 2: Running the script on a Windows system
2930 os .name = 'nt'
30- assert ( is_linux () is False )
31+ assert not is_linux ()
3132
3233 # Test case 3: Running the script on a different operating system
3334 os .name = 'mac'
34- assert ( is_linux () is False )
35+ assert not is_linux ()
3536
3637
3738def test_is_windows ():
3839 # Test case 1: Running the script on a Linux system
3940 os .name = 'posix'
40- assert ( is_windows () is False )
41+ assert not is_windows ()
4142
4243 # Test case 2: Running the script on a Windows system
4344 os .name = 'nt'
44- assert ( is_windows () is True )
45+ assert is_windows ()
4546
4647 # Test case 3: Running the script on a different operating system
4748 os .name = 'mac'
48- assert (is_windows () is False )
49-
50-
51- # Run the tests
52- test_is_linux ()
53- test_is_windows ()
49+ assert not is_windows ()
You can’t perform that action at this time.
0 commit comments