Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gaogaotiantian committed Feb 28, 2025
1 parent 1fe15c1 commit 1bf2de4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_multiprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ def test_code_string(self):
with open(os.path.join(tmpdir, os.listdir(tmpdir)[0])) as f:
self.assertSubprocessName("python -c", json.load(f))

@unittest.skipIf(sys.platform == "win32", "Windows uses exe for python entries")
def test_python_entries(self):
script = textwrap.dedent("""
import subprocess
Expand All @@ -325,7 +324,11 @@ def check_func(data):
pids = set()
for entry in data["traceEvents"]:
pids.add(entry["pid"])
self.assertEqual(len(pids), 2)
if sys.platform == "win32":
# Windows uses exe for python entries and we can't hook that
self.assertEqual(len(pids), 1)
else:
self.assertEqual(len(pids), 2)

with tempfile.TemporaryDirectory() as tmpdir:
output_path = os.path.join(tmpdir, "result.json")
Expand Down

0 comments on commit 1bf2de4

Please sign in to comment.