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

Commit 9488d1c

Browse filesBrowse files
committed
Make axisartist.grid_finder pseudo-tests real.
1 parent 07ed9c5 commit 9488d1c
Copy full SHA for 9488d1c

File tree

Expand file treeCollapse file tree

2 files changed

+16
-9
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+16
-9
lines changed

‎lib/mpl_toolkits/axisartist/grid_finder.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axisartist/grid_finder.py
-9Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -338,12 +338,3 @@ def __call__(self, direction, factor, values):
338338
r = [self._format_dict.get(k, v) for k, v in zip(values,
339339
fallback_strings)]
340340
return r
341-
342-
343-
if __name__ == "__main__":
344-
locator = MaxNLocator()
345-
locs, nloc, factor = locator(0, 100)
346-
347-
fmt = FormatterPrettyPrint()
348-
349-
print(fmt("left", None, locs))
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from __future__ import (absolute_import, division, print_function,
2+
unicode_literals)
3+
4+
from mpl_toolkits.axisartist.grid_finder import (
5+
FormatterPrettyPrint,
6+
MaxNLocator)
7+
8+
9+
def test_pretty_print_format():
10+
locator = MaxNLocator()
11+
locs, nloc, factor = locator(0, 100)
12+
13+
fmt = FormatterPrettyPrint()
14+
15+
assert fmt("left", None, locs) == \
16+
[r'$\mathdefault{%d}$' % (l, ) for l in locs]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.