summaryrefslogtreecommitdiffstats
path: root/libdimension-python/tests/canvas.py
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-06-15 23:27:19 -0600
committerTavian Barnes <tavianator@gmail.com>2011-06-15 23:29:35 -0600
commit438e4c497d5a9f8e9fd75ea63fb05eac860c2708 (patch)
tree82cb6973b66e85d9e481464c614af7d30e7fb5a9 /libdimension-python/tests/canvas.py
parent7ecc68172b00ef429ebde05064c8dfe39c25ecb9 (diff)
downloaddimension-438e4c497d5a9f8e9fd75ea63fb05eac860c2708.tar.xz
Make python module more "pythonic".
Use lower_case instead of mixedCase, and add docstrings.
Diffstat (limited to 'libdimension-python/tests/canvas.py')
-rwxr-xr-xlibdimension-python/tests/canvas.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/libdimension-python/tests/canvas.py b/libdimension-python/tests/canvas.py
index e69d2d9..97f322d 100755
--- a/libdimension-python/tests/canvas.py
+++ b/libdimension-python/tests/canvas.py
@@ -23,25 +23,25 @@ from dimension import *
import errno
# Treat warnings as errors for tests
-dieOnWarnings(True)
+die_on_warnings(True)
canvas = Canvas(768, 480)
assert canvas.width == 768, canvas.width
assert canvas.height == 480, canvas.height
-havePNG = True
+have_PNG = True
try:
- canvas.optimizePNG()
+ canvas.optimize_PNG()
except OSError as e:
if e.errno == errno.ENOSYS:
havePNG = False
else:
raise
-haveGL = True
+have_GL = True
try:
- canvas.optimizeGL()
+ canvas.optimize_GL()
except OSError as e:
if e.errno == errno.ENOSYS:
haveGL = False
@@ -50,8 +50,8 @@ except OSError as e:
canvas.clear(Blue)
-if havePNG:
- canvas.writePNG('png.png')
+if have_PNG:
+ canvas.write_PNG('png.png')
#if haveGL:
# canvas.drawGL()