From 5f46020e7090e28495d2b7e66e58f2c74698917a Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 22 Sep 2011 19:06:57 -0400 Subject: Use double rather than single quotes for Python strings. --- libdimension-python/tests/canvas.py | 2 +- libdimension-python/tests/color.py | 8 ++++---- libdimension-python/tests/demo.py | 2 +- libdimension-python/tests/geometry.py | 18 +++++++++--------- 4 files changed, 15 insertions(+), 15 deletions(-) (limited to 'libdimension-python') diff --git a/libdimension-python/tests/canvas.py b/libdimension-python/tests/canvas.py index 239a548..0f07d66 100755 --- a/libdimension-python/tests/canvas.py +++ b/libdimension-python/tests/canvas.py @@ -51,7 +51,7 @@ except OSError as e: canvas.clear(Blue) if have_PNG: - canvas.write_PNG('png.png') + canvas.write_PNG("png.png") #if haveGL: # canvas.drawGL() diff --git a/libdimension-python/tests/color.py b/libdimension-python/tests/color.py index 363aa0d..88e0b42 100755 --- a/libdimension-python/tests/color.py +++ b/libdimension-python/tests/color.py @@ -25,9 +25,9 @@ from dimension import * die_on_warnings(True) c = Color(0, 0.5, 1, trans = 0.5, filter = 0.35) -assert repr(c) == 'dimension.Color(0.0, 0.5, 1.0, 0.5, 0.35)', repr(c) -assert str(c) == '', str(c) +assert repr(c) == "dimension.Color(0.0, 0.5, 1.0, 0.5, 0.35)", repr(c) +assert str(c) == "", str(c) assert c.red == 0, c.red assert c.green == 0.5, c.green assert c.blue == 1, c.blue @@ -35,7 +35,7 @@ assert c.trans == 0.5, c.filter assert c.filter == 0.35, c.trans c = Color(1, 0.5, 0) -assert str(c) == '', str(c) +assert str(c) == "", str(c) assert Black == Color(0, 0, 0), Black assert White == Color(1, 1, 1), White diff --git a/libdimension-python/tests/demo.py b/libdimension-python/tests/demo.py index a9774bc..720a96c 100755 --- a/libdimension-python/tests/demo.py +++ b/libdimension-python/tests/demo.py @@ -56,4 +56,4 @@ scene.recursion_limit = 5 scene.raytrace() if have_PNG: - canvas.write_PNG('demo.png') + canvas.write_PNG("demo.png") diff --git a/libdimension-python/tests/geometry.py b/libdimension-python/tests/geometry.py index cf9cb41..dddd4ea 100755 --- a/libdimension-python/tests/geometry.py +++ b/libdimension-python/tests/geometry.py @@ -37,8 +37,8 @@ v = Vector(1.5, 2.5, 3.5) assert v.x == 1.5, v.x assert v.y == 2.5, v.y assert v.z == 3.5, v.z -assert repr(v) == 'dimension.Vector(1.5, 2.5, 3.5)', repr(v) -assert str(v) == '<1.5, 2.5, 3.5>', str(v) +assert repr(v) == "dimension.Vector(1.5, 2.5, 3.5)", repr(v) +assert str(v) == "<1.5, 2.5, 3.5>", str(v) v = Vector(x = 2, y = 3, z = 6) @@ -58,13 +58,13 @@ m = Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) -assert repr(m) == 'dimension.Matrix(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, \ -9.0, 10.0, 11.0, 12.0)', repr(m) -assert str(m) == '\n' \ - '[1.0\t2.0\t3.0\t4.0]\n' \ - '[5.0\t6.0\t7.0\t8.0]\n' \ - '[9.0\t10.0\t11.0\t12.0]\n' \ - '[0.0\t0.0\t0.0\t1.0]', str(m) +assert repr(m) == "dimension.Matrix(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, \ +9.0, 10.0, 11.0, 12.0)", repr(m) +assert str(m) == "\n" \ + "[1.0\t2.0\t3.0\t4.0]\n" \ + "[5.0\t6.0\t7.0\t8.0]\n" \ + "[9.0\t10.0\t11.0\t12.0]\n" \ + "[0.0\t0.0\t0.0\t1.0]", str(m) s = scale(0.5) assert s == Matrix(0.5, 0, 0, 0, -- cgit v1.2.3