@@ -46,31 +46,31 @@ def test_dunder_tuples(self):
4646
4747 # math
4848 self .assertEqual (
49- round (color + (.25 ,.25 ,.25 ),init . decimalPlaces ),
49+ round (color + (.25 ,.25 ,.25 ),3 ),
5050 HSL (60.25 ,0.75 ,1.0 )
5151 )
5252 self .assertEqual (
53- round (color - (.25 ,.5 ,0.75 ),init . decimalPlaces ),
53+ round (color - (.25 ,.5 ,0.75 ),3 ),
5454 HSL (59.75 ,0.0 ,0.0 )
5555 )
5656 self .assertEqual (
57- round (color * (.1 ,.5 ,0.75 ),init . decimalPlaces ),
57+ round (color * (.1 ,.5 ,0.75 ),3 ),
5858 HSL (6.0 ,0.25 ,0.562 )
5959 )
6060 self .assertEqual (
61- round (color / (.1 ,.5 ,0.75 ),init . decimalPlaces ),
61+ round (color / (.1 ,.5 ,0.75 ),3 ),
6262 HSL (360 ,1.0 ,1.0 )
6363 )
6464 self .assertEqual (
65- round (color // (.1 ,.5 ,0.75 ),init . decimalPlaces ),
65+ round (color // (.1 ,.5 ,0.75 ),3 ),
6666 HSL (360 ,1.0 ,1.0 )
6767 )
6868 self .assertEqual (
69- round (color ** (.1 ,.5 ,0.75 ),init . decimalPlaces ),
69+ round (color ** (.1 ,.5 ,0.75 ),3 ),
7070 HSL (1.506 ,0.707 ,0.806 )
7171 )
7272 self .assertEqual (
73- round (color % (.1 ,.5 ,0.75 ),init . decimalPlaces ),
73+ round (color % (.1 ,.5 ,0.75 ),3 ),
7474 HSL (0.1 , 0.0 , 0.0 )
7575 )
7676
@@ -87,31 +87,31 @@ def test_dunder_RGB(self):
8787
8888 # math
8989 self .assertEqual (
90- round (color + RGB (32 , 64 , 128 ),init . decimalPlaces ),
90+ round (color + RGB (32 , 64 , 128 ),3 ),
9191 HSL (280.0 ,1 ,1 )
9292 )
9393 self .assertEqual (
94- round (color - RGB (32 , 64 , 128 ),init . decimalPlaces ),
94+ round (color - RGB (32 , 64 , 128 ),3 ),
9595 HSL (0 ,0 ,0.436 )
9696 )
9797 self .assertEqual (
98- round (color * RGB (4 , 3 , 2 ),init . decimalPlaces ),
98+ round (color * RGB (4 , 3 , 2 ),3 ),
9999 HSL (360 ,0.167 ,0.009 )
100100 )
101101 self .assertEqual (
102- round (color / RGB (4 , 3 , 2 ),init . decimalPlaces ),
102+ round (color / RGB (4 , 3 , 2 ),3 ),
103103 HSL (2.0 ,1 ,1 )
104104 )
105105 self .assertEqual (
106- round (color // RGB (9 , 7 , 5 ),init . decimalPlaces ),
106+ round (color // RGB (9 , 7 , 5 ),3 ),
107107 HSL (2.0 ,1.0 ,1 )
108108 )
109109 self .assertEqual (
110- round (color ** RGB (2 , 2 , 1 ),init . decimalPlaces ),
110+ round (color ** RGB (2 , 2 , 1 ),3 ),
111111 HSL (360 , 0.794 , 0.998 )
112112 )
113113 self .assertEqual (
114- round (color % RGB (9 , 7 , 5 ),init . decimalPlaces ),
114+ round (color % RGB (9 , 7 , 5 ),3 ),
115115 HSL (0.0 , 0.214 , 0.021 )
116116 )
117117
@@ -127,31 +127,31 @@ def test_dunder_HEX(self):
127127
128128 # math
129129 self .assertEqual (
130- round (color + HEX ("#204080" ),init . decimalPlaces ),
130+ round (color + HEX ("#204080" ),3 ),
131131 HSL (280.0 , 1 , 1 )
132132 )
133133 self .assertEqual (
134- round (color - HEX ("#204080" ),init . decimalPlaces ),
134+ round (color - HEX ("#204080" ),3 ),
135135 HSL (0 , 0 , 0.436 )
136136 )
137137 self .assertEqual (
138- round (color * HEX ("#040302" ),init . decimalPlaces ),
138+ round (color * HEX ("#040302" ),3 ),
139139 HSL (360 , 0.167 , 0.009 )
140140 )
141141 self .assertEqual (
142- round (color / HEX ("#040302" ),init . decimalPlaces ),
142+ round (color / HEX ("#040302" ),3 ),
143143 HSL (2.0 , 1 , 1 )
144144 )
145145 self .assertEqual (
146- round (color // HEX ("#090705" ),init . decimalPlaces ),
146+ round (color // HEX ("#090705" ),3 ),
147147 HSL (2.0 , 1.0 , 1 )
148148 )
149149 self .assertEqual (
150- round (color ** HEX ("#020201" ),init . decimalPlaces ),
150+ round (color ** HEX ("#020201" ),3 ),
151151 HSL (360 , 0.794 , 0.998 )
152152 )
153153 self .assertEqual (
154- round (color % HEX ("#090705" ),init . decimalPlaces ),
154+ round (color % HEX ("#090705" ),3 ),
155155 HSL (0.0 , 0.214 , 0.021 )
156156 )
157157
@@ -167,31 +167,31 @@ def test_dunder_HSL(self):
167167
168168 # math
169169 self .assertEqual (
170- round (color + HSL (.25 ,.25 ,.25 ),init . decimalPlaces ),
170+ round (color + HSL (.25 ,.25 ,.25 ),3 ),
171171 HSL (60.25 ,0.75 ,1.0 )
172172 )
173173 self .assertEqual (
174- round (color - HSL (.25 ,.5 ,0.75 ),init . decimalPlaces ),
174+ round (color - HSL (.25 ,.5 ,0.75 ),3 ),
175175 HSL (59.75 ,0.0 ,0.0 )
176176 )
177177 self .assertEqual (
178- round (color * HSL (.1 ,.5 ,0.75 ),init . decimalPlaces ),
178+ round (color * HSL (.1 ,.5 ,0.75 ),3 ),
179179 HSL (6.0 ,0.25 ,0.562 )
180180 )
181181 self .assertEqual (
182- round (color / HSL (.1 ,.5 ,0.75 ),init . decimalPlaces ),
182+ round (color / HSL (.1 ,.5 ,0.75 ),3 ),
183183 HSL (360 ,1.0 ,1.0 )
184184 )
185185 self .assertEqual (
186- round (color // HSL (.1 ,.5 ,0.75 ),init . decimalPlaces ),
186+ round (color // HSL (.1 ,.5 ,0.75 ),3 ),
187187 HSL (360 ,1.0 ,1.0 )
188188 )
189189 self .assertEqual (
190- round (color ** HSL (.1 ,.5 ,0.75 ),init . decimalPlaces ),
190+ round (color ** HSL (.1 ,.5 ,0.75 ),3 ),
191191 HSL (1.506 ,0.707 ,0.806 )
192192 )
193193 self .assertEqual (
194- round (color % HSL (.1 ,.5 ,0.75 ),init . decimalPlaces ),
194+ round (color % HSL (.1 ,.5 ,0.75 ),3 ),
195195 HSL (0.1 , 0.0 , 0.0 )
196196 )
197197
@@ -207,31 +207,31 @@ def test_dunder_HSV(self):
207207
208208 # math
209209 self .assertEqual (
210- round (color + HSV (.25 , .25 , .25 ),init . decimalPlaces ),
210+ round (color + HSV (.25 , .25 , .25 ),3 ),
211211 HSL (60.0 ,0.643 ,0.97 )
212212 )
213213 self .assertEqual (
214- round (color - HSV (.25 , .5 , 0.75 ),init . decimalPlaces ),
214+ round (color - HSV (.25 , .5 , 0.75 ),3 ),
215215 HSL (60.0 ,0.074 ,0.187 )
216216 )
217217 self .assertEqual (
218- round (color * HSV (.1 , .5 , 0.75 ),init . decimalPlaces ),
218+ round (color * HSV (.1 , .5 , 0.75 ),3 ),
219219 HSL (0.0 ,0.213 ,0.422 )
220220 )
221221 self .assertEqual (
222- round (color / HSV (30 , .5 , 0.75 ),init . decimalPlaces ),
222+ round (color / HSV (30 , .5 , 0.75 ),3 ),
223223 HSL (2 ,1 ,1 )
224224 )
225225 self .assertEqual (
226- round (color // HSV (30 , .5 , 0.75 ),init . decimalPlaces ),
226+ round (color // HSV (30 , .5 , 0.75 ),3 ),
227227 HSL (2.0 ,1.0 ,1.0 )
228228 )
229229 self .assertEqual (
230- round (color ** HSV (.1 , .5 , 0.75 ),init . decimalPlaces ),
230+ round (color ** HSV (.1 , .5 , 0.75 ),3 ),
231231 HSL (1.0 , 0.744 , 0.85 )
232232 )
233233 self .assertEqual (
234- round (color % HSV (30 , .5 , 0.75 ),init . decimalPlaces ),
234+ round (color % HSV (30 , .5 , 0.75 ),3 ),
235235 HSL (0 ,0.074 ,0.187 )
236236 )
237237
@@ -247,30 +247,30 @@ def test_dunder_CMYK(self):
247247
248248 # math
249249 self .assertEqual (
250- round (color + CMYK (.9 ,.9 ,.75 ,.1 ),init . decimalPlaces ),
250+ round (color + CMYK (.9 ,.9 ,.75 ,.1 ),3 ),
251251 HSL (300.0 ,0.925 ,0.907 )
252252 )
253253 self .assertEqual (
254- round (color - CMYK (.9 ,.9 ,.75 ,.1 ),init . decimalPlaces ),
254+ round (color - CMYK (.9 ,.9 ,.75 ,.1 ),3 ),
255255 HSL (0 ,0.075 ,0.593 )
256256 )
257257 self .assertEqual (
258- round (color * CMYK (.9 ,.9 ,.75 ,.9 ),init . decimalPlaces ),
258+ round (color * CMYK (.9 ,.9 ,.75 ,.9 ),3 ),
259259 HSL (360 ,0.167 ,0.013 )
260260 )
261261 self .assertEqual (
262- round (color / CMYK (.9 ,.9 ,.75 ,.9 ),init . decimalPlaces ),
262+ round (color / CMYK (.9 ,.9 ,.75 ,.9 ),3 ),
263263 HSL (0.25 ,1 ,1 )
264264 )
265265 self .assertEqual (
266- round (color // CMYK (.9 ,.9 ,.75 ,.9 ),init . decimalPlaces ),
266+ round (color // CMYK (.9 ,.9 ,.75 ,.9 ),3 ),
267267 HSL (0.0 ,1.0 ,1 )
268268 )
269269 self .assertEqual (
270- round (color ** CMYK (.01 ,.1 ,.1 ,.2 ),init . decimalPlaces ),
270+ round (color ** CMYK (.01 ,.1 ,.1 ,.2 ),3 ),
271271 HSL (1.0 ,0.904 ,0.804 )
272272 )
273273 self .assertEqual (
274- round (color % CMYK (0.75 ,0.25 ,0.25 ,0.15 ),init . decimalPlaces ),
274+ round (color % CMYK (0.75 ,0.25 ,0.25 ,0.15 ),3 ),
275275 HSL (60.0 ,0.5 ,0.325 )
276276 )
0 commit comments