better-exceptions/test/output/python3-xterm-ascii-color.out

150 lines
6.1 KiB
Plaintext
Raw Normal View History

2017-03-24 08:10:14 +03:00
python3 test/test.py
Traceback (most recent call last):
File "test/test.py", line 16, in <module>
shallow(bar, 15)
| -> 2
-> <function shallow at 0xDEADBEEF>
File "test/test.py", line 7, in shallow
deep(a + b)
| | -> 15
| -> 2
-> <function deep at 0xDEADBEEF>
File "test/test.py", line 12, in deep
assert val > 10 and foo == 60
 | -> 52
 -> 17
AssertionError: assert val > 10 and foo == 60
python3 test/test_color.py
True
python3 test/test_encoding.py
Traceback (most recent call last):
File "test/test_encoding.py", line 13, in <module>
div()
-> <function div at 0xDEADBEEF>
File "test/test_encoding.py", line 10, in div
return _deep('天')
 -> <function _deep at 0xDEADBEEF>
File "test/test_encoding.py", line 7, in _deep
return 1 / val
 -> '天'
TypeError: unsupported operand type(s) for /: 'int' and 'str'
2017-03-24 08:10:14 +03:00
./test/test_interactive.sh
spawn python3 -m better_exceptions -q
>>> import better_exceptions
>>> def foo(a):
... assert a > 10
...
>>> foo(1)
Traceback (most recent call last):
File "<console>", line 1, in <module>
foo(1)
-> <function foo at 0xDEADBEEF>
File "<console>", line 2, in foo
assert a > 10
 -> 1
AssertionError: assert a > 10
>>> exit()
./test/test_string.sh
2017-03-24 10:37:58 +03:00
import better_exceptions; a = 5; assert a > 10 # this should work fine
Traceback (most recent call last):
File "<string>", line 1, in <module>
import better_exceptions; a = 5; assert a > 10 # this should work fine
 | -> 5
 -> 5
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
2017-03-24 08:10:14 +03:00
Traceback (most recent call last):
File "<string>", line 1, in <module>
2017-03-24 09:58:27 +03:00
import better_exceptions; a = 5; assert a > 10 # this should work fine
 | -> 5
 -> 5
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
2017-03-24 08:10:14 +03:00
2017-03-24 10:37:58 +03:00
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
Traceback (most recent call last):
File "<string>", line 1, in <module>
2017-03-24 10:47:01 +03:00
from __future__ import print_function; import better_exceptions; a = 'why hello there'; print(a); assert False
 | -> 'why hello there'
2017-03-24 10:37:58 +03:00
 -> 'why hello there'
2017-03-24 10:47:01 +03:00
AssertionError: from __future__ import print_function; import better_exceptions; a = 'why hello there'; print(a); assert False
2017-03-24 10:37:58 +03:00
why hello there
2017-03-29 00:13:27 +03:00
2017-03-24 10:37:58 +03:00
Traceback (most recent call last):
File "<string>", line 1, in <module>
2017-03-24 10:47:01 +03:00
from __future__ import print_function; import better_exceptions; a = 'why hello there'; print(a); assert False
 | -> 'why hello there'
2017-03-24 10:37:58 +03:00
 -> 'why hello there'
2017-03-24 10:47:01 +03:00
AssertionError: from __future__ import print_function; import better_exceptions; a = 'why hello there'; print(a); assert False
2017-03-29 00:13:27 +03:00
why hello there
2017-03-24 10:47:01 +03:00
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
Traceback (most recent call last):
File "<string>", line 1, in <module>
from __future__ import print_function; import better_exceptions; a = 'why hello ' + ' there'; print(a); assert False
 | -> 'why hello there'
 -> 'why hello there'
AssertionError: from __future__ import print_function; import better_exceptions; a = 'why hello ' + ' there'; print(a); assert False
why hello there
2017-03-29 00:13:27 +03:00
2017-03-24 10:47:01 +03:00
Traceback (most recent call last):
File "<string>", line 1, in <module>
from __future__ import print_function; import better_exceptions; a = 'why hello ' + ' there'; print(a); assert False
 | -> 'why hello there'
 -> 'why hello there'
AssertionError: from __future__ import print_function; import better_exceptions; a = 'why hello ' + ' there'; print(a); assert False
2017-03-29 00:13:27 +03:00
why hello there
python3 test/test_logging.py
ERROR:__main__:callback failed
Traceback (most recent call last):
File "test/test_logging.py", line 15, in foo
cb()
-> <function bar3 at 0xDEADBEEF>
File "test/test_logging.py", line 32, in bar3
raise Exception('this is a test exception')
Exception: this is a test exception
ERROR:__main__:callback failed
Traceback (most recent call last):
File "test/test_logging.py", line 15, in foo
cb()
-> <function bar4 at 0xDEADBEEF>
File "test/test_logging.py", line 37, in bar4
assert baz == 90
 -> 52
AssertionError: assert baz == 90
2017-03-24 10:37:58 +03:00
2017-03-24 08:10:14 +03:00