Skip to content

Commit 0f33a52

Browse files
committed
gh-98894: Skip dtrace tests when building without dtrace
Skip functional test_dtrace cases when CPython was not configured with --with-dtrace.
1 parent 55bc312 commit 0f33a52

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_dtrace.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@ class TraceTests:
324324

325325
@classmethod
326326
def setUpClass(self):
327+
if not sysconfig.get_config_var('WITH_DTRACE'):
328+
raise unittest.SkipTest(
329+
"CPython must be configured with the --with-dtrace option."
330+
)
327331
self.backend.assert_usable()
328332

329333
def run_case(self, name):

0 commit comments

Comments
 (0)