Skip to content

Commit 5ef23e3

Browse files
committed
Check for curses
1 parent b5550f5 commit 5ef23e3

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Lib/test/test_profiling/test_sampling_profiler/test_trend_tracker.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
"""Simple unit tests for TrendTracker."""
22

33
import unittest
4-
import curses
4+
from test.support import requires
5+
from test.support.import_helper import import_module
6+
7+
# Only run these tests if curses is available
8+
requires("curses")
9+
curses = import_module("curses")
510

611
from profiling.sampling.live_collector.trend_tracker import TrendTracker
712

0 commit comments

Comments
 (0)