From 438e4c497d5a9f8e9fd75ea63fb05eac860c2708 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 15 Jun 2011 23:27:19 -0600 Subject: Make python module more "pythonic". Use lower_case instead of mixedCase, and add docstrings. --- libdimension-python/tests/canvas.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libdimension-python/tests/canvas.py') 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() -- cgit v1.2.3