mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Replaces syntax that was relevant in earlier Python versions but that now has modernized equivalents.
10 lines
227 B
Python
10 lines
227 B
Python
import warnings
|
|
|
|
from pelican.tests.support import unittest
|
|
|
|
|
|
class TestSuiteTest(unittest.TestCase):
|
|
|
|
def test_error_on_warning(self):
|
|
with self.assertRaises(UserWarning):
|
|
warnings.warn('test warning')
|