From 840deaccc1276e7dca166851fa9f7f231e0c4909 Mon Sep 17 00:00:00 2001 From: Fabien Benureau Date: Thu, 13 Jun 2013 12:28:59 +0200 Subject: [PATCH] test to measure color performance --- tests/test_color.py | 10 ++++++++++ tests/testenv.py | 3 +++ 2 files changed, 13 insertions(+) create mode 100644 tests/test_color.py create mode 100644 tests/testenv.py diff --git a/tests/test_color.py b/tests/test_color.py new file mode 100644 index 0000000..4dd1b01 --- /dev/null +++ b/tests/test_color.py @@ -0,0 +1,10 @@ +import testenv +from papers import color + +def perf_color(): + s = str(range(1000)) + for _ in range(5000000): + color.dye(s, color.red) + +if __name__ == '__main__': + perf_color() \ No newline at end of file diff --git a/tests/testenv.py b/tests/testenv.py new file mode 100644 index 0000000..bacd731 --- /dev/null +++ b/tests/testenv.py @@ -0,0 +1,3 @@ +# Adjusting paths. +import os, sys +sys.path.insert(0, os.path.abspath(os.path.join(__file__, '../..'))) \ No newline at end of file