Skip to content

Commit 4cc0482

Browse files
committed
fix: skip the test if no permission
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
1 parent 0c858f9 commit 4cc0482

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_profiling/test_sampling_profiler.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3031,6 +3031,9 @@ def worker(x):
30313031
timeout=10
30323032
)
30333033

3034+
if "PermissionError" in result.stderr:
3035+
self.skipTest("Insufficient permissions for remote profiling")
3036+
30343037
self.assertIn("Results: [2, 4, 6]", result.stdout)
30353038
self.assertNotIn("Can't pickle", result.stderr)
30363039

0 commit comments

Comments
 (0)