Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8f3dccb

Browse filesBrowse files
committed
Make it possible to toggle coverage from matplotlib.test()
1 parent 6fa4a76 commit 8f3dccb
Copy full SHA for 8f3dccb

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@ def _get_nose_env():
15361536
return env
15371537

15381538

1539-
def test(verbosity=1):
1539+
def test(verbosity=1, coverage=False):
15401540
"""run the matplotlib test suite"""
15411541
_init_tests()
15421542

@@ -1560,9 +1560,14 @@ def test(verbosity=1):
15601560
# a list.
15611561
multiprocess._instantiate_plugins = plugins
15621562

1563+
env = _get_nose_env()
1564+
if coverage:
1565+
env['NOSE_WITH_COVERAGE'] = 1
1566+
15631567
success = nose.run(
15641568
defaultTest=default_test_modules,
15651569
config=config,
1570+
env=env,
15661571
)
15671572
finally:
15681573
if old_backend.lower() != 'agg':

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.