cpython/Lib/test/test_warnings/data/import_warning.py

3 lines
88 B
Python

import warnings
warnings.warn('module-level warning', DeprecationWarning, stacklevel=2)