From 48f5578e838e3d9bd06faf272c22874133f51604 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Mon, 15 Jul 2013 21:13:36 +0000 Subject: [PATCH] enable warnings and fix issues reported by that git-svn-id: http://svn.code.sf.net/p/pyx/code/trunk/pyx@3437 a4f5e268-e194-4f32-bce1-d30804cbbcc5 --- test/functional/Makefile | 2 +- test/functional/test_arrow.py | 4 ++-- test/functional/test_axis.py | 4 ++-- test/functional/test_bargraph.py | 4 ++-- test/functional/test_bbox.py | 2 +- test/functional/test_bitmap.py | 4 ++-- test/functional/test_box.py | 4 ++-- test/functional/test_canvas.py | 4 ++-- test/functional/test_color.py | 4 ++-- test/functional/test_connector.py | 4 ++-- test/functional/test_deformer.py | 2 +- test/functional/test_epsfile.py | 2 +- test/functional/test_fill.py | 4 ++-- test/functional/test_graph.py | 4 ++-- test/functional/test_graph3d.py | 4 ++-- test/functional/test_layer.py | 4 ++-- test/functional/test_path.py | 2 +- test/functional/test_pattern.py | 4 ++-- test/functional/test_text.py | 4 ++-- 19 files changed, 33 insertions(+), 33 deletions(-) diff --git a/test/functional/Makefile b/test/functional/Makefile index 22715a47..d89e7689 100644 --- a/test/functional/Makefile +++ b/test/functional/Makefile @@ -13,5 +13,5 @@ clean: eps: $(epsfiles) %.eps: %.py - export PYTHONPATH=$(CURDIR)/../..; cd $(dir $^) ; $(PYTHON) $(notdir $^) + export PYTHONPATH=$(CURDIR)/../..; cd $(dir $^) ; $(PYTHON) -W default $(notdir $^) diff --git a/test/functional/test_arrow.py b/test/functional/test_arrow.py index a17febc9..d0b015e9 100755 --- a/test/functional/test_arrow.py +++ b/test/functional/test_arrow.py @@ -121,6 +121,6 @@ c = canvas.canvas() testarrow(c) linehatched(c) testbrace(c) -c.writeEPSfile("test_arrow", paperformat=document.paperformat.A4, rotated=0, fittosize=1) -c.writePDFfile("test_arrow", paperformat=document.paperformat.A4) +c.writeEPSfile("test_arrow", page_paperformat=document.paperformat.A4, page_rotated=0, page_fittosize=1) +c.writePDFfile("test_arrow", page_paperformat=document.paperformat.A4) diff --git a/test/functional/test_axis.py b/test/functional/test_axis.py index 50fa8b8f..ba009383 100755 --- a/test/functional/test_axis.py +++ b/test/functional/test_axis.py @@ -44,6 +44,6 @@ c.insert(pathaxis(path.circle(4, 17, 4), lintest = {"min": 0, "max": 2*math.pi, "divisor": math.pi/180, "parter": linparter(["30"])} c.insert(pathaxis(path.circle(14, 17, 4), lin(painter=regular(labeldirection=rotatetext.parallel), **lintest))) -c.writeEPSfile("test_axis", paperformat=document.paperformat.A4) -c.writePDFfile("test_axis", paperformat=document.paperformat.A4) +c.writeEPSfile("test_axis", page_paperformat=document.paperformat.A4) +c.writePDFfile("test_axis", page_paperformat=document.paperformat.A4) diff --git a/test/functional/test_bargraph.py b/test/functional/test_bargraph.py index d0236310..ecce9fab 100755 --- a/test/functional/test_bargraph.py +++ b/test/functional/test_bargraph.py @@ -46,6 +46,6 @@ test_bar2(c, 7, 0) test_bar3(c, 0, -7) test_bar4(c, 0, -14) test_bar5(c, 7, -19) -c.writeEPSfile("test_bargraph", paperformat=document.paperformat.A4) -c.writePDFfile("test_bargraph", paperformat=document.paperformat.A4) +c.writeEPSfile("test_bargraph", page_paperformat=document.paperformat.A4) +c.writePDFfile("test_bargraph", page_paperformat=document.paperformat.A4) diff --git a/test/functional/test_bbox.py b/test/functional/test_bbox.py index 19cc68d8..9bfc0b80 100644 --- a/test/functional/test_bbox.py +++ b/test/functional/test_bbox.py @@ -118,5 +118,5 @@ testarcbbox(c) testcurvetobbox(c) testtrafobbox(c) testclipbbox(c) -c.writeEPSfile("test_bbox", paperformat=document.paperformat.A4, rotated=1, fittosize=1) +c.writeEPSfile("test_bbox", page_paperformat=document.paperformat.A4, page_rotated=1, page_fittosize=1) c.writePDFfile("test_bbox") diff --git a/test/functional/test_bitmap.py b/test/functional/test_bitmap.py index 52d34284..657446c6 100644 --- a/test/functional/test_bitmap.py +++ b/test/functional/test_bitmap.py @@ -30,6 +30,6 @@ c.insert(bitmap_bw_storearray) c.insert(bitmap_rgb_storearray) if paletteimage: c.insert(bitmap.bitmap(6, 0, paletteimage, height=1.8)) -c.writeEPSfile("test_bitmap", paperformat=document.paperformat.A4) -c.writePDFfile("test_bitmap", paperformat=document.paperformat.A4) +c.writeEPSfile("test_bitmap", page_paperformat=document.paperformat.A4) +c.writePDFfile("test_bitmap", page_paperformat=document.paperformat.A4) diff --git a/test/functional/test_box.py b/test/functional/test_box.py index b438ae3a..3865c204 100755 --- a/test/functional/test_box.py +++ b/test/functional/test_box.py @@ -35,6 +35,6 @@ sc = c.insert(canvas.canvas([trafo.translate(0, 0)])) drawexample(sc, 1, 0) sc = c.insert(canvas.canvas([trafo.translate(6, 0)])) drawexample(sc, 1, 1) -c.writeEPSfile("test_box", paperformat=document.paperformat.A4) -c.writePDFfile("test_box", paperformat=document.paperformat.A4) +c.writeEPSfile("test_box", page_paperformat=document.paperformat.A4) +c.writePDFfile("test_box", page_paperformat=document.paperformat.A4) diff --git a/test/functional/test_canvas.py b/test/functional/test_canvas.py index 254686e8..e9466f2b 100755 --- a/test/functional/test_canvas.py +++ b/test/functional/test_canvas.py @@ -21,6 +21,6 @@ c.stroke(p.transformed(t1*t2*t3), [color.rgb.green, style.linestyle.dashed]) c.stroke(p, [color.rgb.red, style.linestyle.dotted, t3, t2, t1]) -c.writeEPSfile("test_canvas", paperformat=document.paperformat.A4) -c.writePDFfile("test_canvas", paperformat=document.paperformat.A4) +c.writeEPSfile("test_canvas", page_paperformat=document.paperformat.A4) +c.writePDFfile("test_canvas", page_paperformat=document.paperformat.A4) diff --git a/test/functional/test_color.py b/test/functional/test_color.py index 4cec9e1d..d80e9bcb 100644 --- a/test/functional/test_color.py +++ b/test/functional/test_color.py @@ -45,12 +45,12 @@ for col in [color.grey.black, color.grey(0.25), color.grey(0.5), color.grey(0.75 pos = colrow(c, pos, col) -c.writeEPSfile("test_color", paperformat=document.paperformat.A4, fittosize=1) +c.writeEPSfile("test_color", page_paperformat=document.paperformat.A4, page_fittosize=1) # transparency tests c.fill(path.rect(-1, -1, 2, 2), [color.rgb.red]) c.fill(path.circle(0, 0, 1.2), [color.transparency(0.5), color.rgb.green]) c.fill(path.rect(-2, -0.5, 4, 1), [color.transparency(0.9), color.rgb.blue]) -c.writePDFfile("test_color", paperformat=document.paperformat.A4, fittosize=1) +c.writePDFfile("test_color", page_paperformat=document.paperformat.A4, page_fittosize=1) diff --git a/test/functional/test_connector.py b/test/functional/test_connector.py index b7743ff9..7189d2d6 100644 --- a/test/functional/test_connector.py +++ b/test/functional/test_connector.py @@ -87,6 +87,6 @@ dotest(c, 0, 0, "testline") dotest(c, 25, 0, "testarc") dotest(c, 25,30, "testcurve") dotest(c, 0,20, "testtwolines") -c.writeEPSfile("test_connector", paperformat=document.paperformat.A4, rotated=0, fittosize=1) -c.writePDFfile("test_connector", paperformat=document.paperformat.A4, rotated=0, fittosize=1) +c.writeEPSfile("test_connector", page_paperformat=document.paperformat.A4, page_rotated=0, page_fittosize=1) +c.writePDFfile("test_connector", page_paperformat=document.paperformat.A4, page_rotated=0, page_fittosize=1) diff --git a/test/functional/test_deformer.py b/test/functional/test_deformer.py index e2ee5042..e988da2d 100644 --- a/test/functional/test_deformer.py +++ b/test/functional/test_deformer.py @@ -257,6 +257,6 @@ dotest(c, 20, 0, "testcornersmoothed") dotest(c, 0, 0, "testparallel_1") dotest(c, 6, 13, "testparallel_2") dotest(c, 0, 20, "testlinesmoothed") -c.writeEPSfile("test_deformer", paperformat=document.paperformat.A4, rotated=1, fittosize=1) +c.writeEPSfile("test_deformer", page_paperformat=document.paperformat.A4, page_rotated=1, page_fittosize=1) c.writePDFfile("test_deformer") diff --git a/test/functional/test_epsfile.py b/test/functional/test_epsfile.py index cbccba85..e64153e6 100755 --- a/test/functional/test_epsfile.py +++ b/test/functional/test_epsfile.py @@ -9,7 +9,7 @@ c.stroke(path.line(10*unit.u_pt, 10*unit.u_pt, 40*unit.u_pt, 40*unit.u_pt)+ path.line(10*unit.u_pt, 40*unit.u_pt, 40*unit.u_pt, 10*unit.u_pt)) # path.rect(10*unit.u_pt, 10*unit.u_pt, 30*unit.u_pt, 30*unit.u_pt)) -c.writeEPSfile("cross", bboxenlarge=0) +c.writeEPSfile("cross", page_bboxenlarge=0) c = canvas.canvas() diff --git a/test/functional/test_fill.py b/test/functional/test_fill.py index 8b0551e1..1eeee9e0 100644 --- a/test/functional/test_fill.py +++ b/test/functional/test_fill.py @@ -9,6 +9,6 @@ c.fill(p) c.fill(p, [trafo.translate(4, 0), style.fillrule.even_odd]) -c.writeEPSfile(paperformat=document.paperformat.A4, fittosize=1) -c.writePDFfile(paperformat=document.paperformat.A4, fittosize=1) +c.writeEPSfile(page_paperformat=document.paperformat.A4, page_fittosize=1) +c.writePDFfile(page_paperformat=document.paperformat.A4, page_fittosize=1) diff --git a/test/functional/test_graph.py b/test/functional/test_graph.py index c0894fe6..7819655a 100755 --- a/test/functional/test_graph.py +++ b/test/functional/test_graph.py @@ -95,6 +95,6 @@ test_allerrorbars(c, -7, 0) test_split(c, -7, 7) test_split2(c, -7, 14) -c.writeEPSfile("test_graph", paperformat=document.paperformat.A4) -c.writePDFfile("test_graph", paperformat=document.paperformat.A4) +c.writeEPSfile("test_graph", page_paperformat=document.paperformat.A4) +c.writePDFfile("test_graph", page_paperformat=document.paperformat.A4) diff --git a/test/functional/test_graph3d.py b/test/functional/test_graph3d.py index 1d71b7a3..30bf1292 100755 --- a/test/functional/test_graph3d.py +++ b/test/functional/test_graph3d.py @@ -33,6 +33,6 @@ test_grid(c, 8, 0) test_surface(c, 8, -8) test_surface2d(c, -3, -20) -c.writeEPSfile("test_graph3d", paperformat=document.paperformat.A4) -c.writePDFfile("test_graph3d", paperformat=document.paperformat.A4) +c.writeEPSfile("test_graph3d", page_paperformat=document.paperformat.A4) +c.writePDFfile("test_graph3d", page_paperformat=document.paperformat.A4) diff --git a/test/functional/test_layer.py b/test/functional/test_layer.py index e30b9131..b1ab4dd4 100644 --- a/test/functional/test_layer.py +++ b/test/functional/test_layer.py @@ -13,6 +13,6 @@ l2.text(0.5, 0, "2", [color.rgb.green, text.halign.center, text.vshift.mathaxis] l1a.text(0.75, 0, "1a", [color.rgb.blue, text.halign.center, text.vshift.mathaxis]) l1a.stroke(path.line(0.25, -0.25, 0.25, 0.25), [color.rgb.blue]) -c.writeEPSfile("test_layer", paperformat=document.paperformat.A4, fittosize=1) -c.writePDFfile("test_layer", paperformat=document.paperformat.A4, fittosize=1) +c.writeEPSfile("test_layer", page_paperformat=document.paperformat.A4, page_fittosize=1) +c.writePDFfile("test_layer", page_paperformat=document.paperformat.A4, page_fittosize=1) diff --git a/test/functional/test_path.py b/test/functional/test_path.py index 120540e4..0cb75727 100755 --- a/test/functional/test_path.py +++ b/test/functional/test_path.py @@ -211,5 +211,5 @@ dotest(c, 12, -4, "testtangent") dotest(c, 5, -4, "testintersectcircle") dotest(c, 9, -4, "testintersectline") dotest(c, 21, 12, "testarclentoparam") -c.writeEPSfile("test_path", paperformat=document.paperformat.A4, rotated=0, fittosize=1) +c.writeEPSfile("test_path", page_paperformat=document.paperformat.A4, page_rotated=0, page_fittosize=1) c.writePDFfile("test_path") diff --git a/test/functional/test_pattern.py b/test/functional/test_pattern.py index b3d6ccb1..4125b395 100755 --- a/test/functional/test_pattern.py +++ b/test/functional/test_pattern.py @@ -18,5 +18,5 @@ pa2.text(0.125, 0.125, r"\PyX") c.draw(path.rect(-1, -1, 1, 1), [deco.filled([pa2]), deco.stroked]) -c.writeEPSfile("test_pattern", paperformat=document.paperformat.A4) -c.writePDFfile("test_pattern", paperformat=document.paperformat.A4) +c.writeEPSfile("test_pattern", page_paperformat=document.paperformat.A4) +c.writePDFfile("test_pattern", page_paperformat=document.paperformat.A4) diff --git a/test/functional/test_text.py b/test/functional/test_text.py index f68dd672..c762de8d 100755 --- a/test/functional/test_text.py +++ b/test/functional/test_text.py @@ -112,7 +112,7 @@ sc.stroke(p, [deco.curvedtext("\PyX{} is fun!", textattrs=[trafo.mirror(), trafo deco.curvedtext("right", textattrs=[text.halign.right, text.vshift.mathaxis, trafo.mirror(), trafo.scale(1.2)], arclenfromend=0.5, exclude=0.1)]) c.insert(sc, [trafo.translate(12, 12)]) -c.writePDFfile("test_text", paperformat=document.paperformat.A4) +c.writePDFfile("test_text", page_paperformat=document.paperformat.A4) c.insert(c.text(10, 4, r"""% \fbox{\includegraphics[% @@ -134,4 +134,4 @@ c.insert(c.text(10, 4, r"""% %draft=, %% do not print anything, clip=]% %! directly in dvi {sample}}""")) -c.writeEPSfile("test_text", paperformat=document.paperformat.A4) +c.writeEPSfile("test_text", page_paperformat=document.paperformat.A4) -- 2.11.4.GIT