8000 Svg fontweight fix by xwtang · Pull Request #3346 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Svg fontweight fix #3346

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

Closed
wants to merge 3 commits into from
Closed

Conversation

xwtang
Copy link
Contributor
@xwtang xwtang commented Aug 6, 2014

fix a bug in SVG backend when saving fonts with 'Bold' weight.
add a nose test.

xwtang added 2 commits July 26, 2014 15:20
font-weight is not properly saved to the svg file.
@tacaswell
Copy link
Member

As a side note, you can just keep pushing to the same branch and the PR will update it's self. If you want to discard a commit, git force --push will do the trick (just be careful, it's a foot-cannon).

This is replaces #3308

@tacaswell tacaswell added this to the v1.4.x milestone Aug 6, 2014
@tacaswell
Copy link
Member

And the test-failure is pep8 confromance in the tests you added.

======================================================================
FAIL: matplotlib.tests.test_coding_standards.test_pep8_conformance
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib/tests/test_coding_standards.py", line 253, in test_pep8_conformance
    assert_pep8_conformance()
  File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib/tests/test_coding_standards.py", line 237, in assert_pep8_conformance
    assert_equal(result.total_errors, 0, msg)
AssertionError: Found code syntax errors (and warnings):
/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib/tests/test_backend_svg.py:81:32: E231 missing whitespace after ','
/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib/tests/test_backend_svg.py:82:30: E231 missing whitespace after ','

@xwtang
Copy link
Contributor Author
xwtang commented Aug 6, 2014

I’ve modified the code to conform to PEP8.

Sorry for all these problems. It’s the first time I create ‘pull requests’ to a public repository. I’m not familiar with all these rules (although I have read the documents on matplotlib.org).

By the way, I’m not sure what is the purpose of the test code. One of the guys said that the testing code should show 'Something that fails before this change, and works correctly after it’. I don’t understand because I’ve already fix the problem, how can I show the problem and the fix the same time? From my understanding from reading the docs on matplotlib.org, the testing code is intended to reproduce the same result as that of the baseline example. This is very different from 'Something that fails before this change, and works correctly after it’.

thank you guys for being so patient!

On Aug 6, 2014, at 9:52 PM, Thomas A Caswell notifications@github.com wrote:

And the test-failure is pep8 confromance in the tests you added.

FAIL: matplotlib.tests.test_coding_standards.test_pep8_conformance

Traceback (most recent call last):
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib/tests/test_coding_standards.py", line 253, in test_pep8_conformance
assert_pep8_conformance()
File "/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib/tests/test_coding_standards.py", line 237, in assert_pep8_conformance
assert_equal(result.total_errors, 0, msg)
AssertionError: Found code syntax errors (and warnings):
/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib/tests/test_backend_svg.py:81:32: E231 missing whitespace after ','
/home/travis/virtualenv/python2.7.8/lib/python2.7/site-packages/matplotlib-1.4.x-py2.7-linux-x86_64.egg/matplotlib/tests/test_backend_svg.py:82:30: E231 missing whitespace after ','


Reply to this email directly or view it on GitHub.

@mdboom
Copy link
Member
mdboom commented Aug 6, 2014

My intent was: The test should do something that before this bugfix would produce an image that is incorrect, and after the bugfix would produce something correct. I think you've done that here, but I haven't confirmed.

@tacaswell
Copy link
Member

ping @xwtang Will you be able to write a test for this?

@tacaswell tacaswell modified the milestones: v1.4.x, 1.5.0 Feb 7, 2015
@tacaswell tacaswell closed this Feb 17, 2015
@tacaswell
Copy link
Member

Merged to master as cc3a4c1

tacaswell added a commit that referenced this pull request Feb 17, 2015
This was PR #3346, but merged to master instead of v1.4.x
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.

3 participants
0