diff options
Diffstat (limited to 'tests/test_manager.py')
-rw-r--r-- | tests/test_manager.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_manager.py b/tests/test_manager.py index 16f1be80..4f76d09c 100644 --- a/tests/test_manager.py +++ b/tests/test_manager.py @@ -7,6 +7,7 @@ import site import sys import time import unittest +import warnings from collections.abc import Iterator from contextlib import contextmanager from unittest import mock @@ -383,6 +384,15 @@ class AstroidManagerTest( self.manager.ast_from_module_name(None) +class IsolatedAstroidManagerTest(resources.AstroidCacheSetupMixin, unittest.TestCase): + def test_no_user_warning(self): + mgr = manager.AstroidManager() + with warnings.catch_warnings(): + warnings.filterwarnings("error", category=UserWarning) + mgr.ast_from_module_name("setuptools") + mgr.ast_from_module_name("pip") + + class BorgAstroidManagerTC(unittest.TestCase): def test_borg(self) -> None: """Test that the AstroidManager is really a borg, i.e. that two different |