Skip to content

Commit 1c64337

Browse files
author
Dmitry Kovalenko
committed
TestLocalOperations tests skip Windows
1 parent 45cfbf7 commit 1c64337

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_local.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
import platform
23

34
from testgres import ExecUtilException
45
from testgres import LocalOperations
@@ -10,10 +11,16 @@ class TestLocalOperations:
1011
def setup(self):
1112
self.operations = LocalOperations()
1213

14+
def skip_if_windows():
15+
if platform.system().lower() == "windows":
16+
pytest.skip("This test does not support Windows.")
17+
1318
def test_exec_command_success(self):
1419
"""
1520
Test exec_command for successful command execution.
1621
"""
22+
__class__.skip_if_windows()
23+
1724
cmd = "python3 --version"
1825
response = self.operations.exec_command(cmd, wait_exit=True, shell=True)
1926

@@ -23,6 +30,8 @@ def test_exec_command_failure(self):
2330
"""
2431
Test exec_command for command execution failure.
2532
"""
33+
__class__.skip_if_windows()
34+
2635
cmd = "nonexistent_command"
2736
while True:
2837
try:
@@ -37,6 +46,8 @@ def test_exec_command_failure__expect_error(self):
3746
"""
3847
Test exec_command for command execution failure.
3948
"""
49+
__class__.skip_if_windows()
50+
4051
cmd = "nonexistent_command"
4152

4253
exit_status, result, error = self.operations.exec_command(cmd, verbose=True, wait_exit=True, shell=True, expect_error=True)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy