summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-03-05 19:55:13 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2010-03-05 19:55:13 +0000
commit81b0b90d83aaff20a92f3823dca9660b5b6e6775 (patch)
tree9666a885774b02cf0b12589aceabf853b4518e42
parent7c526147cf55d9b4656e59ee4db83cccfb4b861d (diff)
downloadmako-81b0b90d83aaff20a92f3823dca9660b5b6e6775.tar.gz
README cleanup, fix a new test for py3k
-rw-r--r--README14
-rw-r--r--README.py3k10
-rw-r--r--setup.py2
-rw-r--r--test/test_exceptions.py2
4 files changed, 20 insertions, 8 deletions
diff --git a/README b/README
index 00d25e0..224c744 100644
--- a/README
+++ b/README
@@ -4,16 +4,22 @@ All licenses allow for non-commercial and commercial use.
To install:
- python setup.py install
+ python setup.py install
SVN checkouts also inlcude setup.cfg file allowing setuptools to create
an svn-tagged build.
Documentation is available in HTML format in the ./doc/ directory.
-Running unittests:
+Unit tests run via nose, and are available via setup.py:
- python test/alltests.py
+ python setup.py test
+
+Or direct nose usage:
+
+ nosetests -v
+
+For Python 3 information, see README.py3k.
good luck !
-
+
diff --git a/README.py3k b/README.py3k
index 3e3c8ab..cf51731 100644
--- a/README.py3k
+++ b/README.py3k
@@ -14,7 +14,6 @@ Running as a user with permission to modify the Python distribution,
install Distribute:
python3 distribute_setup.py
-
Installing Mako in Python 3
---------------------------------
@@ -30,15 +29,20 @@ Converting Tests, Examples, Source to Python 3
To convert all files in the source distribution, run
the 2to3 script:
- 2to3 --no-diffs -w lib test examples
+ 2to3 -w mako test
+
+If using 3.1's 2to3 tool, the --no-diffs flag might help
+with unicode issues:
+ 2to3-3.1 -w --no-diffs mako test
+
The above will rewrite all files in-place in Python 3 format.
Running Tests
-------------
To run the unit tests, ensure Distribute is installed as above,
-and also that at least the ./lib/ and ./test/ directories have been converted
+and also that at least the ./mako/ and ./test/ directories have been converted
to Python 3 using the source tool above. A Python 3 version of Nose
can be acquired from Bitbucket using Mercurial:
diff --git a/setup.py b/setup.py
index dda072f..25360fc 100644
--- a/setup.py
+++ b/setup.py
@@ -46,6 +46,8 @@ SVN version:
license='MIT',
packages=find_packages('.', exclude=['ez_setup', 'examples', 'tests']),
scripts=['scripts/mako-render'],
+ tests_require = ['nose >= 0.11'],
+ test_suite = "nose.collector",
zip_safe=False,
install_requires=[
'Beaker>=1.1',
diff --git a/test/test_exceptions.py b/test/test_exceptions.py
index e64afc2..22f879d 100644
--- a/test/test_exceptions.py
+++ b/test/test_exceptions.py
@@ -137,7 +137,7 @@ ${foobar}
try:
raise RuntimeError("error 2")
except:
- html_error = exceptions.html_error_template().render(error=t, traceback=tback)
+ html_error = exceptions.html_error_template().render_unicode(error=t, traceback=tback)
# obfuscate the text so that this text
# isn't in the 'wrong' exception