diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-05-17 12:34:58 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-05-17 12:34:58 -0400 |
commit | bfb18a479b78645f973f20489021f374c008262f (patch) | |
tree | 0f6c0c4b0ffa60dc1c35c67e0a989598fd3490aa | |
parent | 11876582894bd37e3a75305a92f44a0e1a947421 (diff) | |
download | python-coveragepy-git-bfb18a479b78645f973f20489021f374c008262f.tar.gz |
Finish up #305.
-rw-r--r-- | CHANGES.txt | 4 | ||||
-rw-r--r-- | tests/test_process.py | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 26bd45cb..1b7295be 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -14,8 +14,12 @@ Change history for Coverage.py - The XML report will now create the output directory if need be, fixing `issue 285`_. Thanks Chris Rose. +- The coverage module no longer causes deprecation warnings on Python 3.4 by + importing the imp module, fixing `issue 305`_. + .. _issue 94: https://bitbucket.org/ned/coveragepy/issue/94/coverage-xml-doesnt-produce-sources .. _issue 285: https://bitbucket.org/ned/coveragepy/issue/285/xml-report-fails-if-output-file-directory +.. _issue 305: https://bitbucket.org/ned/coveragepy/issue/305/pendingdeprecationwarning-the-imp-module 3.7.1 -- 13 December 2013 diff --git a/tests/test_process.py b/tests/test_process.py index fa4759a8..bb110499 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -502,6 +502,18 @@ class ProcessTest(CoverageTest): # about 5. self.assertGreater(data.summary()['os.py'], 50) + def test_deprecation_warnings(self): + # Test that coverage doesn't trigger deprecation warnings. + # https://bitbucket.org/ned/coveragepy/issue/305/pendingdeprecationwarning-the-imp-module + self.make_file("allok.py", """\ + import warnings + warnings.simplefilter('default') + import coverage + print("No warnings!") + """) + out = self.run_command("python allok.py") + self.assertEqual(out, "No warnings!\n") + class AliasedCommandTest(CoverageTest): """Tests of the version-specific command aliases.""" |