From ecdd3ee5dadf417b3f0ce99dde258721dba732e1 Mon Sep 17 00:00:00 2001 From: jparisu Date: Tue, 20 Jun 2023 14:35:42 +0200 Subject: [PATCH] TMP test windows system test Signed-off-by: jparisu --- .../py_utils/unittest/system/test_System.py | 58 +++++++++++++------ 1 file changed, 40 insertions(+), 18 deletions(-) diff --git a/py_utils/test/py_utils/unittest/system/test_System.py b/py_utils/test/py_utils/unittest/system/test_System.py index ec51327e..016dc9e5 100644 --- a/py_utils/test/py_utils/unittest/system/test_System.py +++ b/py_utils/test/py_utils/unittest/system/test_System.py @@ -21,29 +21,51 @@ from py_utils.system.system_utils import is_linux, is_windows +def test_is_test(): + assert True + + def test_is_linux(): - # Test case 1: Running the script on a Linux system - os.name = 'posix' - assert is_linux() - # Test case 2: Running the script on a Windows system - os.name = 'nt' - assert not is_linux() + # Test case 0: Running the script in its own system + # NOTE: this could use same method as the function internally, but it is what it is. + if os.name == 'posix': + assert is_linux() + + if os.name == 'nt': + assert not is_linux() + +# # Test case 1: Running the script on a Linux system +# os.name = 'posix' +# assert is_linux() - # Test case 3: Running the script on a different operating system - os.name = 'mac' - assert not is_linux() +# # Test case 2: Running the script on a Windows system +# os.name = 'nt' +# assert not is_linux() + +# # Test case 3: Running the script on a different operating system +# os.name = 'mac' +# assert not is_linux() def test_is_windows(): - # Test case 1: Running the script on a Linux system - os.name = 'posix' - assert not is_windows() - # Test case 2: Running the script on a Windows system - os.name = 'nt' - assert is_windows() + # Test case 0: Running the script in its own system + # NOTE: this could use same method as the function internally, but it is what it is. + if os.name == 'posix': + assert not is_windows() + + if os.name == 'nt': + assert is_windows() + +# # Test case 1: Running the script on a Linux system +# os.name = 'posix' +# assert not is_windows() + +# # Test case 2: Running the script on a Windows system +# os.name = 'nt' +# assert is_windows() - # Test case 3: Running the script on a different operating system - os.name = 'mac' - assert not is_windows() +# # Test case 3: Running the script on a different operating system +# os.name = 'mac' +# assert not is_windows()