Skip to content

Commit

Permalink
Apply changes
Browse files Browse the repository at this point in the history
Signed-off-by: Irene Bandera <[email protected]>
  • Loading branch information
irenebm committed Jun 13, 2023
1 parent f7b7dfb commit bf0a423
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions py_utils/test/py_utils/unittest/system/test_System.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,33 @@
"""

import os

from py_utils.system.system_utils import is_linux, is_windows


def test_is_linux():
# Test case 1: Running the script on a Linux system
os.name = 'posix'
assert (is_linux() is True)
assert is_linux()

# Test case 2: Running the script on a Windows system
os.name = 'nt'
assert (is_linux() is False)
assert not is_linux()

# Test case 3: Running the script on a different operating system
os.name = 'mac'
assert (is_linux() is False)
assert not is_linux()


def test_is_windows():
# Test case 1: Running the script on a Linux system
os.name = 'posix'
assert (is_windows() is False)
assert not is_windows()

# Test case 2: Running the script on a Windows system
os.name = 'nt'
assert (is_windows() is True)
assert is_windows()

# Test case 3: Running the script on a different operating system
os.name = 'mac'
assert (is_windows() is False)


# Run the tests
test_is_linux()
test_is_windows()
assert not is_windows()

0 comments on commit bf0a423

Please sign in to comment.