8000 Add Py.test testing framework support by Kojoley · Pull Request #6730 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Add Py.test testing framework support #6730

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Aug 23, 2016
Next Next commit
Do not rely on outer scope variables in `ImageComparisonTest.test.do_…
…test`

`do_test` function variables are changed by loop where function was creates.
It will work as you expect only if you call yielded function immediately.
  • Loading branch information
Kojoley committed Aug 21, 2016
commit 903d11899b677749fc7e8346efdcaa1ad5662c42
4 changes: 2 additions & 2 deletions lib/matplotlib/testing/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def test(self):
@knownfailureif(
will_fail, fail_msg,
known_exception_class=ImageComparisonFailure)
def do_test():
def do_test(fignum, actual_fname, expected_fname):
figure = plt.figure(fignum)

if self._remove_text:
Expand All @@ -255,7 +255,7 @@ def do_test():
(self._freetype_version, ft2font.__freetype_version__))
raise

yield (do_test,)
yield do_test, fignum, actual_fname, expected_fname


def image_comparison(baseline_images=None, extensions=None, tol=0,
Expand Down
0