Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit a892071

Browse files
yashlambapdxjohnny
authored andcommitted
tests: Modified/Skipped tests as required for Windows
1 parent a30de6c commit a892071

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/docs/test_consoletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def pickle_load(fileobj):
246246

247247

248248
for filepath in DOCS_PATH.rglob("*.rst"):
249-
if ":test:" not in pathlib.Path(filepath).read_text():
249+
if b":test:" not in pathlib.Path(filepath).read_bytes():
250250
continue
251251
relative = filepath.relative_to(DOCS_PATH).with_suffix("")
252252
name = "test_" + str(relative).replace(os.sep, "_")

tests/util/test_net.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import shutil
55
import tarfile
66
import pathlib
7+
import platform
78
import tempfile
89
import contextlib
910
import unittest.mock
@@ -49,6 +50,7 @@ def do_GET(self):
4950
ARCHIVE_HASH = "28f82a69e04fa2dfb6e09c94082d6c6100c546e23d2331c78f307601ccc0265374c3c8abedff60ad0caccb6e8fc3995a"
5051

5152

53+
@unittest.skipIf(platform.system() == "Windows", "Does not work on Windows")
5254
class TestNet(AsyncTestCase):
5355
def verify_extracted_contents(self, extracted):
5456
self.assertTrue((extracted / "somedir").is_dir())

0 commit comments

Comments
 (0)