11import pytest
2- import platform
32
43from testgres import ExecUtilException
54from testgres import LocalOperations
65
6+ from .helpers .run_conditions import RunConditions
7+
78
89class TestLocalOperations :
910
1011 @pytest .fixture (scope = "function" , autouse = True )
1112 def setup (self ):
1213 self .operations = LocalOperations ()
1314
14- def skip_if_windows ():
15- if platform .system ().lower () == "windows" :
16- pytest .skip ("This test does not support Windows." )
17-
1815 def test_exec_command_success (self ):
1916 """
2017 Test exec_command for successful command execution.
2118 """
22- __class__ .skip_if_windows ()
19+ RunConditions .skip_if_windows ()
2320
2421 cmd = "python3 --version"
2522 response = self .operations .exec_command (cmd , wait_exit = True , shell = True )
@@ -30,7 +27,7 @@ def test_exec_command_failure(self):
3027 """
3128 Test exec_command for command execution failure.
3229 """
33- __class__ .skip_if_windows ()
30+ RunConditions .skip_if_windows ()
3431
3532 cmd = "nonexistent_command"
3633 while True :
@@ -46,7 +43,7 @@ def test_exec_command_failure__expect_error(self):
4643 """
4744 Test exec_command for command execution failure.
4845 """
49- __class__ .skip_if_windows ()
46+ RunConditions .skip_if_windows ()
5047
5148 cmd = "nonexistent_command"
5249
0 commit comments