- Jul 03, 2016
-
-
Pulkit Goyal authored
This patch includes addition of absolute_import and print_function to the files where they are missing. The modern importing conventions are also followed.
-
- Dec 07, 2015
-
-
Gregory Szorc authored
-
- Apr 12, 2015
-
-
Augie Fackler authored
-
- Sep 28, 2014
-
-
Yuya Nishihara authored
Trailing newline characters are kept in lines.
-
Yuya Nishihara authored
In order to mimic module-level evaluation, globals and locals should be the same object, so doctest does not pass separate locals dict. https://docs.python.org/2.7/reference/simple_stmts.html#exec This fixes NameError in the following example: >>> import foo >>> def bar(): ... foo # must exist in globalvars
-
- Nov 07, 2011
-
-
Matt Mackall authored
Normally changes in tests are reported like this in diffs: $ cat foo - a + b Using -i mode lets us update tests when the new results are correct and/or populate tests with their output. But with the standard doctest framework, inline Python sections in tests changes instead result in a big failure report that's unhelpful. So here, we replace the doctest calls with a simple compile/eval loop.
-
- Nov 01, 2011
-
-
Brodie Rao authored
This fix mirrors the changes made to test-doctest.py in b856071435f7 and 967adcf5910d. Without this change, tests running heredoctest.py can fail on certain versions of OS X when TERM is set to xterm-256color: $ /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -m heredoctest <<EOF > >>> open('b', 'w').write('this' * 1000) > EOF + \x1b[?1034h (no-eol) (esc) A similar problem occurs with test-url.py: $ ./run-tests.py test-url.py --- .../tests/test-url.py.out +++ .../tests/test-url.py.err @@ -0,0 +1 @@ + ERROR: .../test-url.py output changed ! Failed test-url.py: output changed # Ran 1 tests, 0 skipped, 1 failed.
-
- Oct 13, 2011
-
-
Idan Kamara authored
-
- Oct 12, 2011
-
-
Idan Kamara authored
Writes stdin to a temp file and doctests it. In the future we might want to spare the temp file and directly call into doctest. Also, with some tweaking it seems possible to adjust the line numbers reported in an error report so they match the ones in the original file.
-