@@ -66,24 +66,24 @@ def test_LogLocator():
66
66
67
67
68
68
def test_LogLocator_set_params ():
69
- """
70
- Create log locator with default value, base=10.0, subs=[1.0], numdecs=4, numticks=15
71
- and change it to something else.
72
- See if change was successful.
73
- Should not exception.
69
+ """
70
+ Create log locator with default value, base=10.0, subs=[1.0], numdecs=4,
71
+ numticks=15 and change it to something else.
72
+ See if change was successful.
73
+ Should not exception.
74
74
"""
75
75
loc = mticker .LogLocator ()
76
- loc .set_params (numticks = 8 , numdecs = 8 , subs = [2.0 ], base = 8 )
76
+ loc .set_params (numticks = 8 , numdecs = 8 , subs = [2.0 ], base = 8 )
77
77
nose .tools .assert_equal (loc .numticks , 8 )
78
78
nose .tools .assert_equal (loc .numdecs , 8 )
79
79
nose .tools .assert_equal (loc .base , 8 )
80
80
nose .tools .assert_equal (loc .subs , [2.0 ])
81
81
82
82
83
83
def test_NullLocator_set_params ():
84
- """
85
- Create null locator, and attempt to call set_params() on it.
86
- Should not exception, and should raise a warning.
84
+ """
85
+ Create null locator, and attempt to call set_params() on it.
86
+ Should not exception, and should raise a warning.
87
87
"""
88
88
loc = mticker .NullLocator ()
89
89
with warnings .catch_warnings (True ) as w :
@@ -92,49 +92,49 @@ def test_NullLocator_set_params():
92
92
93
93
94
94
def test_MultipleLocator_set_params ():
95
- """
95
+ """
96
96
Create multiple locator with 0.7 base, and change it to something else.
97
- See if change was successful.
98
- Should not exception.
97
+ See if change was successful.
98
+ Should not exception.
99
99
"""
100
- mult = mticker .MultipleLocator (base = 0.7 )
101
- mult .set_params (base = 1.7 )
100
+ mult = mticker .MultipleLocator (base = 0.7 )
101
+ mult .set_params (base = 1.7 )
102
102
nose .tools .assert_equal (mult .base , 1.7 )
103
103
104
104
105
105
def test_FixedLocator_set_params ():
106
- """
106
+ """
107
107
Create fixed locator with 5 nbins, and change it to something else.
108
- See if change was successful.
109
- Should not exception.
108
+ See if change was successful.
109
+ Should not exception.
110
110
"""
111
- fixed = mticker .FixedLocator (range (0 ,24 ),nbins = 5 )
112
- fixed .set_params (nbins = 7 )
111
+ fixed = mticker .FixedLocator (range (0 , 24 ), nbins = 5 )
112
+ fixed .set_params (nbins = 7 )
113
113
nose .tools .assert_equal (fixed .nbins , 7 )
114
114
115
115
116
116
def test_IndexLocator_set_params ():
117
- """
118
- Create index locator with 3 base, 4 offset. and change it to something else.
119
- See if change was successful.
120
- Should not exception.
121
117
"""
122
- index = mticker .IndexLocator (base = 3 , offset = 4 )
123
- index .set_params (base = 7 , offset = 7 )
118
+ Create index locator with 3 base, 4 offset. and change it to something
119
+ else. See if change was successful.
120
+ Should not exception.
121
+ """
122
+ index = mticker .IndexLocator (base = 3 , offset = 4 )
123
+ index .set_params (base = 7 , offset = 7 )
124
124
nose .tools .assert_equal (index .base , 7 )
125
125
nose .tools .assert_equal (index .offset , 7 )
126
126
127
127
128
128
def test_SymmetricalLogLocator_set_params ():
129
- """
129
+ """
130
130
Create symmetrical log locator with default subs =[1.0] numticks = 15,
131
131
and change it to something else.
132
- See if change was successful.
133
- Should not exception.
132
+ See if change was successful.
133
+ Should not exception.
134
134
"""
135
- #since we only test for the params change. I will pass empty transform
135
+ # since we only test for the params change. I will pass empty transform
136
136
sym = mticker .SymmetricalLogLocator (None )
137
- sym .set_params (subs = [2.0 ], numticks = 8 )
137
+ sym .set_params (subs = [2.0 ], numticks = 8 )
138
138
nose .tools .assert_equal (sym ._subs , [2.0 ])
139
139
nose .tools .assert_equal (sym .numticks , 8 )
140
140
0 commit comments