10000 gh-103247: add `tearDown` to `test_loader` and clear module cache by sunmy2019 · Pull Request #104226 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-103247: add tearDown to test_loader and clear module cache #104226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove tearDown
  • Loading branch information
sunmy2019 committed May 7, 2023
commit 6fd7fec53794f1f6a7223ed0c8a692fafc1be244
12 changes: 0 additions & 12 deletions Lib/test/test_importlib/extension/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,6 @@ def setUp(self):
self.loader = self.machinery.ExtensionFileLoader(
self.name, self.spec.origin)

def tearDown(self):
try:
del sys.modules[self.name]
except KeyError:
pass

def load_module(self):
with warnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
Expand Down Expand Up @@ -200,12 +194,6 @@ def setUp(self):
self.loader = self.machinery.ExtensionFileLoader(
self.name, self.spec.origin)

def tearDown(self):
try:
del sys.modules[self.name]
except KeyError:
pass

def load_module(self):
# Load the module from the test extension.
with warnings.catch_warnings():
Expand Down
0