diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2019-04-21 11:34:50 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-04-21 11:34:50 -0400 |
commit | 196b9b02952df0368b43dc4ecd226773b04eca7a (patch) | |
tree | b9a20e82fcaad05e09b6e3b2b022f4626d10875b /tests/test_plugins.py | |
parent | edfe885d9b465ec3f1d17f2d8d73c006850e5c84 (diff) | |
download | python-coveragepy-git-196b9b02952df0368b43dc4ecd226773b04eca7a.tar.gz |
Clean up unused variables
Diffstat (limited to 'tests/test_plugins.py')
-rw-r--r-- | tests/test_plugins.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 5310b48c..180ed62a 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -927,7 +927,6 @@ class DynamicContextPluginTest(CoverageTest): """) def make_testsuite(self): - filenames = [] self.make_file("rendering.py", """\ def html_tag(tag, content): return '<%s>%s</%s>' % (tag, content, tag) @@ -965,8 +964,8 @@ class DynamicContextPluginTest(CoverageTest): return html """) - def run_testsuite(self, coverage, suite_name): - coverage.start() + def run_testsuite(self, cov, suite_name): + cov.start() suite = import_local_file(suite_name) try: # Call all functions in this module @@ -975,8 +974,7 @@ class DynamicContextPluginTest(CoverageTest): if inspect.isfunction(variable): variable() finally: - coverage.stop() - return suite + cov.stop() def test_plugin_standalone(self): self.make_plugin_capitalized_testnames('plugin_tests.py') @@ -987,7 +985,7 @@ class DynamicContextPluginTest(CoverageTest): cov.set_option("run:plugins", ['plugin_tests']) # Run the tests - suite = self.run_testsuite(cov, 'testsuite') + self.run_testsuite(cov, 'testsuite') # Labeled coverage is collected data = cov.get_data() @@ -1018,11 +1016,10 @@ class DynamicContextPluginTest(CoverageTest): cov.set_option("run:plugins", ['plugin_tests']) # Run the tests - suite = self.run_testsuite(cov, 'testsuite') + self.run_testsuite(cov, 'testsuite') # Static context prefix is preserved data = cov.get_data() - filenames = self.get_measured_filenames(data) expected = [ 'mytests', 'mytests:doctest:HTML_TAG', @@ -1041,7 +1038,7 @@ class DynamicContextPluginTest(CoverageTest): cov.set_option("run:dynamic_context", "test_function") # Run the tests - suite = self.run_testsuite(cov, 'testsuite') + self.run_testsuite(cov, 'testsuite') # test_function takes precedence over plugins - only # functions that are not labeled by test_function are @@ -1074,7 +1071,7 @@ class DynamicContextPluginTest(CoverageTest): cov = coverage.Coverage() cov.set_option("run:plugins", ['plugin_renderers', 'plugin_tests']) - suite = self.run_testsuite(cov, 'testsuite') + self.run_testsuite(cov, 'testsuite') # It is important to note, that line 11 (render_bold function) is never # labeled as renderer:bold context, because it is only called from |