Skip to content

[Sprint] Rc fixes #2193

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 24 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2a85769
adds encoding as a function parameter
katyhuff Jun 29, 2013
b300ef3
when dealing with unicode strings, isinstance(u, basestring) will ret…
katyhuff Jun 29, 2013
7eb7ec0
Merge branch 'master' into unicode_rc
katyhuff Jun 29, 2013
aede120
undid enccoding parameter. This can be added later if the encoding ge…
katyhuff Jun 29, 2013
55475a0
adds a test file and a template rc file for the rc_setup tests.
katyhuff Jun 29, 2013
8df2f0b
default test passes.
katyhuff Jun 29, 2013
55d4b44
autopep8'd the test file.
katyhuff Jun 29, 2013
1cfedb9
The matplotlibrc template docstring.hardcopy must use a colon rather …
katyhuff Jun 29, 2013
09a2450
because of commas, Impact and Western were being merged
katyhuff Jun 29, 2013
6d79027
uncomments the matplotlibrc template
katyhuff Jun 29, 2013
a41204d
errors arose for some (but not all) of these parameters inside apostr…
katyhuff Jun 29, 2013
3840623
The matplotlibrc should match the default, which is (f, ctrl+f)
katyhuff Jun 29, 2013
1042544
template test passes.
katyhuff Jun 30, 2013
be48e7d
got rid of print statements from debugging
katyhuff Jun 30, 2013
09bf2dd
unicode test runs
katyhuff Jun 30, 2013
cda758d
merged unicode solution
katyhuff Jun 30, 2013
1976db5
unicode test passes
katyhuff Jun 30, 2013
7302c31
errant space.
katyhuff Jun 30, 2013
febaa0d
updates matplotlibrc.template to mat the defaults in the rcsetup module
katyhuff Jun 30, 2013
c3bfe6c
Merge branch 'master' into rc_fixes
katyhuff Jun 30, 2013
fa3f07d
getting up to date with master
katyhuff Jul 1, 2013
6bd355f
Merge branch 'master' into rc_fixes
katyhuff Jul 1, 2013
15b8b57
makes a proper docstring and removes the assert
katyhuff Jul 2, 2013
4ce865c
fixed typerror
katyhuff Jul 2, 2013
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
autopep8'd the test file.
  • Loading branch information
katyhuff committed Jun 29, 2013
commit 55d4b4448a8bab6951a27f163079a66f3571dec5
9 changes: 6 additions & 3 deletions lib/matplotlib/tests/test_rcsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,27 @@
from matplotlib.tests import assert_str_equal

templaterc = os.path.join(os.path.dirname(__file__), 'test_rcsetup.rc')



def test_defaults():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice to have some unit tests for this! Thanks!

# the default values should be successfully set by this class
deprecated = ['svg.embed_char_paths', 'savefig.extension']
with mpl.rc_context(rc=mpl.rcsetup.defaultParams):
for k, v in mpl.rcsetup.defaultParams.iteritems():
if k not in deprecated :
if k not in deprecated:
assert mpl.rcParams[k][0] == v[0]


def test_template():
# the current matplotlibrc.template should validate successfully
mpl.rc_file(templaterc)
for k, v in templateParams.iteritems():
assert mpl.rcParams[k] == v[0]


def test_unicode():
# unicode formatted valid strings should validate.
for k, v in mpl.rcsetup.defaultParams.iteritems():
for k, v in mpl.rcsetup.defaultParams.iteritems():
assert k == v[1](unicode(v[0]))
assert mpl.rcParams[k] == v[0]

Expand Down