diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-05-16 20:57:15 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-05-16 20:57:15 -0400 |
commit | 7681ff9f70f33651f40c7b64a8186471a7014515 (patch) | |
tree | 0409183fe145e28939cb887aee5145cca3d39b61 /setuptools/tests/test_config.py | |
parent | af199e99549df07f9457567a26a0da8af069f513 (diff) | |
download | external_python_setuptools-7681ff9f70f33651f40c7b64a8186471a7014515.tar.gz external_python_setuptools-7681ff9f70f33651f40c7b64a8186471a7014515.tar.bz2 external_python_setuptools-7681ff9f70f33651f40c7b64a8186471a7014515.zip |
Delete packages from sys.modules
Diffstat (limited to 'setuptools/tests/test_config.py')
-rw-r--r-- | setuptools/tests/test_config.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index 6840a8e2..942050e0 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -1,7 +1,9 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals +import sys import contextlib + import pytest from distutils.errors import DistutilsOptionError, DistutilsFileError @@ -300,6 +302,9 @@ class TestMetadata: with get_dist(tmpdir) as dist: assert dist.metadata.version == '2016.11.26' + del sys.modules['fake_package'] + del sys.modules['fake_package.subpackage'] + subpack.join('othersub.py').write( 'import third_party_module\n' 'VERSION = (2016, 11, 26)' |