##// END OF EJS Templates
Override terminal size in doctests to standardise traceback format...
Thomas Kluyver -
Show More
@@ -28,6 +28,8 b' import sys'
28 import traceback
28 import traceback
29 import unittest
29 import unittest
30
30
31 from testpath import modified_env
32
31 from inspect import getmodule
33 from inspect import getmodule
32
34
33 # We are overriding the default doctest runner, so we need to import a few
35 # We are overriding the default doctest runner, so we need to import a few
@@ -587,8 +589,10 b' class IPDocTestRunner(doctest.DocTestRunner,object):'
587
589
588 test.globs.update(_ip.user_ns)
590 test.globs.update(_ip.user_ns)
589
591
590 return super(IPDocTestRunner,self).run(test,
592 # Override terminal size to standardise traceback format
591 compileflags,out,clear_globs)
593 with modified_env({'COLUMNS': '80', 'LINES': '24'}):
594 return super(IPDocTestRunner,self).run(test,
595 compileflags,out,clear_globs)
592
596
593
597
594 class DocFileCase(doctest.DocFileCase):
598 class DocFileCase(doctest.DocFileCase):
General Comments 0
You need to be logged in to leave comments. Login now