From 5e744c85094ae19085c31d02ef1296a80a59e6a1 Mon Sep 17 00:00:00 2001 From: Kirill Smelkov Date: Sun, 17 Feb 2008 00:47:13 +0300 Subject: [PATCH] test_doc: always set pprint into ascii mode (#706) so our examples always work independently on whether unicode environment is available or not. --- setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5835d4a..100d864 100755 --- a/setup.py +++ b/setup.py @@ -193,6 +193,11 @@ class test_sympy_doc(Command): print "Testing docstrings." + def setup_pprint(doctest): + from sympy import pprint_use_unicode + # use ascii pprint in doctests + pprint_use_unicode(False) + suite = unittest.TestSuite() for perform, module, specific in modules: @@ -207,7 +212,7 @@ class test_sympy_doc(Command): for item in items: module = item.replace('/', '.')[:-3] - suite.addTest(doctest.DocTestSuite(module)) + suite.addTest(doctest.DocTestSuite(module, setUp=setup_pprint)) runner = unittest.TextTestRunner() runner.run(suite) -- 2.11.4.GIT