summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt4
-rw-r--r--tests/test_process.py12
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."""