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

WIP: testing on windows and conda packages/ wheels for master #5604

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 19 commits into from
Dec 4, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TST: better workaround for NamedTempfile problem on windows
  • Loading branch information
jankatins committed Dec 3, 2015
commit 1d1660f74e84f334c6241a938a8338c9faefd3ba
14 changes: 9 additions & 5 deletions 14 lib/matplotlib/tests/test_font_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,15 @@ def test_font_priority():
def test_json_serialization():
# on windows, we can't open a file twice, so save the name and unlink
# manually...
with tempfile.NamedTemporaryFile(delete=False) as temp:
name = temp.name
json_dump(fontManager, name)
copy = json_load(name)
os.remove(name)
try:
name = None
with tempfile.NamedTemporaryFile(delete=False) as temp:
name = temp.name
json_dump(fontManager, name)
copy = json_load(name)
finally:
if name and os.path.exists(name):
os.remove(name)
with warnings.catch_warnings():
warnings.filterwarnings('ignore', 'findfont: Font family.*not found')
for prop in ({'family': 'STIXGeneral'},
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.