Skip to content

Commit cedc5ad

Browse files
committed
Use integer division to make the tests pass on Python3
1 parent 6a735e2 commit cedc5ad

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def test_polar_theta_position():
319319
ax.plot(theta, r)
320320
ax.set_theta_zero_location("NW")
321321
ax.set_theta_direction('clockwise')
322-
322+
323323
@image_comparison(baseline_images=['axvspan_epoch'])
324324
def test_axvspan_epoch():
325325
from datetime import datetime
@@ -389,8 +389,8 @@ def test_imshow():
389389
#Create a NxN image
390390
N=100
391391
(x,y) = np.indices((N,N))
392-
x -= N/2
393-
y -= N/2
392+
x -= N//2
393+
y -= N//2
394394
r = np.sqrt(x**2+y**2-x*y)
395395

396396
#Create a contour plot at N/4 and extract both the clip path and transform
@@ -406,8 +406,8 @@ def test_imshow_clip():
406406
#Create a NxN image
407407
N=100
408408
(x,y) = np.indices((N,N))
409-
x -= N/2
410-
y -= N/2
409+
x -= N//2
410+
y -= N//2
411411
r = np.sqrt(x**2+y**2-x*y)
412412

413413
#Create a contour plot at N/4 and extract both the clip path and transform
@@ -508,7 +508,7 @@ def test_symlog():
508508
# ax.set_xscale('symlog', linthreshx=0.01)
509509
# ax.grid(True)
510510
# ax.set_ylim(-0.1, 0.1)
511-
511+
512512
@image_comparison(baseline_images=['pcolormesh'], tol=0.02)
513513
def test_pcolormesh():
514514
n = 12
@@ -542,7 +542,7 @@ def test_pcolormesh():
542542
ax.set_title('gouraud')
543543
ax.set_xticks([])
544544
ax.set_yticks([])
545-
545+
546546

547547
@image_comparison(baseline_images=['canonical'])
548548
def test_canonical():
@@ -625,7 +625,7 @@ def test_markevery_line():
625625
ax.plot(x, y, '-+', markevery=(5, 20), label='mark every 5 starting at 10')
626626
ax.legend()
627627

628-
628+
629629
if __name__=='__main__':
630630
import nose
631631
nose.runmodule(argv=['-s','--with-doctest'], exit=False)

0 commit comments

Comments
 (0)