Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Skip svg tex test if tex is not installed #5770

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 3 commits into from
Dec 31, 2015

Conversation

jenshnielsen
Copy link
Member

This should fix failure on the 2.x branch after the merge of #5766

This should be merged asap to make the 2.x branch pass again

@jenshnielsen
Copy link
Member Author

Unfortunatly this doesn't seem to fix the issue

@mdboom
Copy link
Member

mdboom commented Dec 31, 2015

Does the baseline image need to be updated?

Beyond that, I wonder if OrdereredDict isn't enough for the issue if things still come in from TeX in a non-deterministic order. We may need to forcibly sort...

@jenshnielsen
Copy link
Member Author

Yes thats true, Not completely sure what happens but this is only an issue on 2.x so presumably ti requires something which is not backported to 2.x

Borrowed from matplotlib#5677 which is not backported to 2.x
@jenshnielsen
Copy link
Member Author

The real reason this fails is that #5677 wasn't backported. That changes the exception in textpath.py to catch Runtime errors too. It's not obvious from #5677 why that is needed by @mdboom might remember

@mdboom
Copy link
Member

mdboom commented Dec 31, 2015

The exception changed in the rewrite of the C++ extensions last year, but none of that was in the test suite (since we didn't have TeX+SVG tests until this one).

I say we just apply

diff --git a/lib/matplotlib/textpath.py b/lib/matplotlib/textpath.py
index c063c3a..b694619 100644
--- a/lib/matplotlib/textpath.py
+++ b/lib/matplotlib/textpath.py
@@ -345,7 +345,7 @@ class TextToPath(object):
                                                     1094995778)]:
                     try:
                         font.select_charmap(charmap_code)
-                    except ValueError:
+                    except (ValueError, RuntimeError):
                         pass
                     else:
                         break

here, and not backport all of #5677 -- it turns out there are few issues with it and we may end up reverting it in the long run.

@jenshnielsen
Copy link
Member Author

@mdboom makes sense I have applied the error change here but I guess we should backport that change (16698e8) all the way to 1.5.x?

I think the other change here should go in to since this test really needs tex to run, But that is against 2.x

@mdboom
Copy link
Member

mdboom commented Dec 31, 2015

I agree on all points. Not sure if it matters too much how we do it -- we can always make another PR against v1.5.x with 16698e8 cherry-picked in it.

tacaswell added a commit that referenced this pull request Dec 31, 2015
Skip svg tex test if tex is not installed
@tacaswell tacaswell merged commit fa2204e into matplotlib:v2.x Dec 31, 2015
@QuLogic QuLogic added this to the next major release (2.0) milestone Dec 31, 2015
@jenshnielsen jenshnielsen deleted the skiptex branch January 5, 2016 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants