Add automatic hook based on an environment variable
This commit is contained in:
parent
c9c2ce9d9c
commit
f926bcccc2
10
MANIFEST.in
Normal file
10
MANIFEST.in
Normal file
@ -0,0 +1,10 @@
|
||||
graft better_exceptions
|
||||
graft test
|
||||
|
||||
include better_exceptions_hook.pth
|
||||
|
||||
include README.md
|
||||
include LICENSE.txt
|
||||
include setup.py
|
||||
include setup.cfg
|
||||
include test_all.sh
|
24
README.md
24
README.md
@ -12,10 +12,11 @@ Install `better_exceptions` via pip:
|
||||
$ pip install better_exceptions
|
||||
```
|
||||
|
||||
And import it somewhere:
|
||||
And set the `BETTER_EXCEPTIONS` environment variable to any value:
|
||||
|
||||
```python
|
||||
import better_exceptions
|
||||
```bash
|
||||
export BETTER_EXCEPTIONS=1 # Linux / OSX
|
||||
setx BETTER_EXCEPTIONS 1 # Windows
|
||||
```
|
||||
|
||||
That's it!
|
||||
@ -25,12 +26,25 @@ That's it!
|
||||
If you want to allow the entirety of values to be outputted instead of being truncated to a certain amount of characters:
|
||||
|
||||
```python
|
||||
import better_exceptions
|
||||
better_exceptions.MAX_LENGTH = None
|
||||
```
|
||||
|
||||
## See Also
|
||||
While using `better_exceptions` in production, do not forget to unset the `BETTER_EXCEPTIONS` variable to avoid leaking sensitive data in your logs.
|
||||
|
||||
- [paradoxxxzero/better-exceptions-hook](https://github.com/paradoxxxzero/better-exceptions-hook) - removes the need to `import better_exceptions` by adding a startup hook
|
||||
## Troubleshooting
|
||||
|
||||
If you do not see beautiful exceptions, first make sure that the environment variable does exist. You can try `echo $BETTER_EXCEPTIONS` (Linux / OSX) or `echo %BETTER_EXCEPTIONS%` (Windows). On Linux and OSX, the `export` command does not add the variable permanently, you will probably need to edit the `~/.profile` file to make it persistent. On Windows, you need to open a new terminal after the `setx` command.
|
||||
|
||||
You should also note that `better_exceptions` does not work inside the Python interactive shell, unless the executed code comes from another file.
|
||||
|
||||
Check that there is no conflict with another library, and that the `sys.excepthook` function has been correctly replaced with the `better_exceptions`'s one. Sometimes other components can set up their own exception handlers, such as the `python3-apport` Ubuntu package that you may need to uninstall.
|
||||
|
||||
Make sure that you have not inadvertently deleted the `better_exceptions_hook.pth` file that should be in the same place as the `better_exceptions` folder where all of your Python packages are installed. Otherwise, try re-installing `better_exceptions`.
|
||||
|
||||
You can also try to manually activate the hook by adding `import better_exceptions; better_exceptions.hook()` at the beginning of your script.
|
||||
|
||||
Finally, if you still can not get this module to work, [open a new issue](https://github.com/Qix-/better-exceptions/issues/new) by describing your problem precisely and detailing your configuration (Python and `better_exceptions` versions, OS, code snippet, interpeter, etc.) so that we can reproduce the bug you are experiencing.
|
||||
|
||||
# License
|
||||
Copyright © 2017, Josh Junon. Licensed under the [MIT license](LICENSE.txt).
|
||||
|
@ -1,6 +1,6 @@
|
||||
"""Beautiful and helpful exceptions
|
||||
|
||||
Just `import better_exceptions` somewhere. It handles the rest.
|
||||
Just set your `BETTER_EXCEPTIONS` environment variable. It handles the rest.
|
||||
|
||||
|
||||
Name: better_exceptions
|
||||
@ -16,16 +16,32 @@ from __future__ import print_function
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from .core import color, context, encoding, log, repl
|
||||
from .core import SUPPORTS_COLOR, THEME, MAX_LENGTH, PIPE_CHAR, CAP_CHAR
|
||||
from .core import __version__, isast, write_stream, ExceptionFormatter
|
||||
from .core.log import BetExcLogger, patch as patch_logging
|
||||
from .core.repl import interact, get_repl
|
||||
from .formatter import THEME, MAX_LENGTH, PIPE_CHAR, CAP_CHAR, ExceptionFormatter
|
||||
from .encoding import to_byte
|
||||
from .context import PY3
|
||||
from .color import SUPPORTS_COLOR, SHOULD_ENCODE, STREAM
|
||||
from .log import BetExcLogger, patch as patch_logging
|
||||
from .repl import interact, get_repl
|
||||
|
||||
|
||||
__version__ = '0.1.8'
|
||||
|
||||
|
||||
THEME = THEME.copy() # Users customizing the theme should not impact core
|
||||
|
||||
|
||||
def write_stream(data, stream=STREAM):
|
||||
if SHOULD_ENCODE:
|
||||
data = to_byte(data)
|
||||
|
||||
if PY3:
|
||||
stream.buffer.write(data)
|
||||
else:
|
||||
stream.write(data)
|
||||
else:
|
||||
stream.write(data)
|
||||
|
||||
|
||||
def format_exception(exc, value, tb):
|
||||
# Rebuild each time to take into account any changes made by the user to the global parameters
|
||||
formatter = ExceptionFormatter(colored=SUPPORTS_COLOR, theme=THEME, max_length=MAX_LENGTH,
|
||||
@ -35,17 +51,16 @@ def format_exception(exc, value, tb):
|
||||
|
||||
def excepthook(exc, value, tb):
|
||||
formatted = format_exception(exc, value, tb)
|
||||
write_stream(formatted)
|
||||
write_stream(formatted, STREAM)
|
||||
|
||||
|
||||
sys.excepthook = excepthook
|
||||
def hook():
|
||||
sys.excepthook = excepthook
|
||||
|
||||
logging.setLoggerClass(BetExcLogger)
|
||||
patch_logging()
|
||||
|
||||
logging.setLoggerClass(BetExcLogger)
|
||||
patch_logging()
|
||||
|
||||
|
||||
if hasattr(sys, 'ps1'):
|
||||
if hasattr(sys, 'ps1'):
|
||||
print('WARNING: better_exceptions will only inspect code from the command line\n'
|
||||
' when using: `python -m better_exceptions\'. Otherwise, only code\n'
|
||||
' loaded from files will be inspected!', file=sys.stderr)
|
||||
|
@ -2,7 +2,8 @@ import argparse
|
||||
import imp
|
||||
import os
|
||||
|
||||
from better_exceptions import interact
|
||||
from better_exceptions import interact, hook
|
||||
hook()
|
||||
|
||||
parser = argparse.ArgumentParser(description='A Python REPL with better exceptions enabled', prog='python -m better_exceptions')
|
||||
parser.add_argument('-q', '--quiet', help="don't show a banner", action='store_true')
|
||||
|
@ -21,15 +21,12 @@ import re
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from .color import STREAM, SUPPORTS_COLOR, SHOULD_ENCODE
|
||||
from .color import STREAM, SUPPORTS_COLOR
|
||||
from .context import PY3
|
||||
from .encoding import ENCODING, to_byte, to_unicode
|
||||
from .repl import get_repl
|
||||
|
||||
|
||||
__version__ = '0.1.8'
|
||||
|
||||
|
||||
PIPE_CHAR = u'\u2502'
|
||||
CAP_CHAR = u'\u2514'
|
||||
|
||||
@ -54,18 +51,6 @@ def isast(v):
|
||||
return inspect.isclass(v) and issubclass(v, ast.AST)
|
||||
|
||||
|
||||
def write_stream(data, stream=STREAM):
|
||||
if SHOULD_ENCODE:
|
||||
data = to_byte(data)
|
||||
|
||||
if PY3:
|
||||
stream.buffer.write(data)
|
||||
else:
|
||||
stream.write(data)
|
||||
else:
|
||||
stream.write(data)
|
||||
|
||||
|
||||
class ExceptionFormatter(object):
|
||||
|
||||
COMMENT_REGXP = re.compile(r'((?:(?:"(?:[^\\"]|(\\\\)*\\")*")|(?:\'(?:[^\\"]|(\\\\)*\\\')*\')|[^#])*)(#.*)$')
|
@ -7,7 +7,7 @@ from logging import Logger, StreamHandler
|
||||
|
||||
def patch():
|
||||
import logging
|
||||
from .. import format_exception
|
||||
from . import format_exception
|
||||
|
||||
logging_format_exception = lambda exc_info: format_exception(*exc_info)
|
||||
|
1
better_exceptions_hook.pth
Normal file
1
better_exceptions_hook.pth
Normal file
@ -0,0 +1 @@
|
||||
import os; exec("try:\n if 'BETTER_EXCEPTIONS' in os.environ:import better_exceptions;better_exceptions.hook()\nexcept:print('An error occured while automatically hooking better_exceptions.\\nIf you uninstalled better_exceptions, you should probably delete any \\'better_exceptions_hook.pth\\' file on your system or unset your \\'BETTER_EXCEPTIONS\\' environment variable.'); raise;")
|
59
setup.py
59
setup.py
@ -1,14 +1,59 @@
|
||||
import re
|
||||
from itertools import chain
|
||||
from os.path import basename
|
||||
from os.path import dirname
|
||||
from os.path import join
|
||||
from os.path import splitext
|
||||
from distutils.core import setup
|
||||
from distutils.command.build import build
|
||||
from setuptools.command.develop import develop
|
||||
from setuptools.command.easy_install import easy_install
|
||||
from setuptools.command.install_lib import install_lib
|
||||
|
||||
with open('better_exceptions/core/__init__.py', 'r') as file:
|
||||
|
||||
class BuildWithPTH(build):
|
||||
def run(self):
|
||||
build.run(self)
|
||||
path = join(dirname(__file__), 'better_exceptions_hook.pth')
|
||||
dest = join(self.build_lib, basename(path))
|
||||
self.copy_file(path, dest)
|
||||
|
||||
|
||||
class EasyInstallWithPTH(easy_install):
|
||||
def run(self):
|
||||
easy_install.run(self)
|
||||
path = join(dirname(__file__), 'better_exceptions_hook.pth')
|
||||
dest = join(self.install_dir, basename(path))
|
||||
self.copy_file(path, dest)
|
||||
|
||||
|
||||
class InstallLibWithPTH(install_lib):
|
||||
def run(self):
|
||||
install_lib.run(self)
|
||||
path = join(dirname(__file__), 'better_exceptions_hook.pth')
|
||||
dest = join(self.install_dir, basename(path))
|
||||
self.copy_file(path, dest)
|
||||
self.outputs = [dest]
|
||||
|
||||
def get_outputs(self):
|
||||
return chain(install_lib.get_outputs(self), self.outputs)
|
||||
|
||||
|
||||
class DevelopWithPTH(develop):
|
||||
def run(self):
|
||||
develop.run(self)
|
||||
path = join(dirname(__file__), 'better_exceptions_hook.pth')
|
||||
dest = join(self.install_dir, basename(path))
|
||||
self.copy_file(path, dest)
|
||||
|
||||
|
||||
with open('better_exceptions/__init__.py', 'r') as file:
|
||||
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
|
||||
file.read(), re.MULTILINE).group(1)
|
||||
|
||||
setup(
|
||||
name = 'better_exceptions',
|
||||
packages = ['better_exceptions', 'better_exceptions.core', 'better_exceptions_core'],
|
||||
package_dir = {'better_exceptions_core': 'better_exceptions/core'},
|
||||
packages = ['better_exceptions'],
|
||||
version = version,
|
||||
description = 'Pretty and helpful exceptions, automatically',
|
||||
author = 'Josh Junon',
|
||||
@ -19,5 +64,13 @@ setup(
|
||||
classifiers = [],
|
||||
extras_require = {
|
||||
':sys_platform=="win32"': ['colorama']
|
||||
},
|
||||
# This all comes from pytest-cov repository:
|
||||
# https://github.com/pytest-dev/pytest-cov/blob/cde7c378b6a1971957759f42ac91e2860b41cf89/setup.py
|
||||
cmdclass = {
|
||||
'build': BuildWithPTH,
|
||||
'easy_install': EasyInstallWithPTH,
|
||||
'install_lib': InstallLibWithPTH,
|
||||
'develop': DevelopWithPTH,
|
||||
}
|
||||
)
|
||||
|
@ -2,16 +2,16 @@ python2 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function shallow at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
[36m│ │ └ 15[m
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function deep at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m │ └ 52[m
|
||||
[36m └ 17[m
|
||||
@ -30,13 +30,13 @@ python2 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
[36m└ <function div at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
[33;1mreturn[m _deep([31m'天'[m)
|
||||
[36m └ <function _deep at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
[33;1mreturn[m [31m1[m / val
|
||||
[36m └ '天'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -69,56 +69,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m │ │ └ 5[m
|
||||
[36m │ └ 5[m
|
||||
[36m └ 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m │ │ └ 5[m
|
||||
[36m │ └ 5[m
|
||||
[36m └ 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
|
||||
@ -128,19 +134,19 @@ python2 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m└ <function bar3 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, in bar3
|
||||
[33;1mraise[m [35;1mException[m([31m'this is a test exception'[m)
|
||||
Exception: this is a test exception
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m└ <function bar4 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
[33;1massert[m baz == [31m90[m
|
||||
[36m └ 52[m
|
||||
AssertionError: [33;1massert[m baz == [31m90[m
|
||||
@ -152,10 +158,10 @@ python2 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
[36m└ <function ...[m
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m └ '999999999...[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -166,10 +172,10 @@ python2 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
[36m└ <function div at 0xDEADBEEF>[m
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m └ '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python2 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, 15)
|
||||
│ └ 2
|
||||
└ <function shallow at 0xDEADBEEF>
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
│ │ └ 15
|
||||
│ └ 2
|
||||
└ <function deep at 0xDEADBEEF>
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
assert val > 10 and foo == 60
|
||||
│ └ 52
|
||||
└ 17
|
||||
@ -30,13 +30,13 @@ python2 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
└ <function div at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
return _deep("天")
|
||||
└ <function _deep at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
return 1 / val
|
||||
└ '天'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -69,56 +69,62 @@ AssertionError: assert a > 10
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
│ │ └ 5
|
||||
│ └ 5
|
||||
└ 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
│ │ └ 5
|
||||
│ └ 5
|
||||
└ 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -128,19 +134,19 @@ python2 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
└ <function bar3 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, 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
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
└ <function bar4 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
assert baz == 90
|
||||
└ 52
|
||||
AssertionError: assert baz == 90
|
||||
@ -152,10 +158,10 @@ python2 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
└ <function ...
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
return 1 / var
|
||||
└ '999999999...
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -166,10 +172,10 @@ python2 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
└ <function div at 0xDEADBEEF>
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
return 1 / var
|
||||
└ '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python2 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m| -> 2[m
|
||||
[36m-> <function shallow at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
[36m| | -> 15[m
|
||||
[36m| -> 2[m
|
||||
[36m-> <function deep at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m | -> 52[m
|
||||
[36m -> 17[m
|
||||
@ -30,13 +30,13 @@ python2 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
[36m-> <function div at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
[33;1mreturn[m _deep([31m'天'[m)
|
||||
[36m -> <function _deep at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
[33;1mreturn[m [31m1[m / val
|
||||
[36m -> '天'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -69,56 +69,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m | | -> 5[m
|
||||
[36m | -> 5[m
|
||||
[36m -> 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m | | -> 5[m
|
||||
[36m | -> 5[m
|
||||
[36m -> 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
|
||||
@ -128,19 +134,19 @@ python2 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m-> <function bar3 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, in bar3
|
||||
[33;1mraise[m [35;1mException[m([31m'this is a test exception'[m)
|
||||
Exception: this is a test exception
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m-> <function bar4 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
[33;1massert[m baz == [31m90[m
|
||||
[36m -> 52[m
|
||||
AssertionError: [33;1massert[m baz == [31m90[m
|
||||
@ -152,10 +158,10 @@ python2 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
[36m-> <function ...[m
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m -> '999999999...[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -166,10 +172,10 @@ python2 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
[36m-> <function div at 0xDEADBEEF>[m
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m -> '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python2 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, 15)
|
||||
| -> 2
|
||||
-> <function shallow at 0xDEADBEEF>
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
| | -> 15
|
||||
| -> 2
|
||||
-> <function deep at 0xDEADBEEF>
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
assert val > 10 and foo == 60
|
||||
| -> 52
|
||||
-> 17
|
||||
@ -30,13 +30,13 @@ python2 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
-> <function div at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
return _deep("天")
|
||||
-> <function _deep at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
return 1 / val
|
||||
-> '天'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -69,56 +69,62 @@ AssertionError: assert a > 10
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
| | -> 5
|
||||
| -> 5
|
||||
-> 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
| | -> 5
|
||||
| -> 5
|
||||
-> 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -128,19 +134,19 @@ python2 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
-> <function bar3 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, 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
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
-> <function bar4 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
assert baz == 90
|
||||
-> 52
|
||||
AssertionError: assert baz == 90
|
||||
@ -152,10 +158,10 @@ python2 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
-> <function ...
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
return 1 / var
|
||||
-> '999999999...
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -166,10 +172,10 @@ python2 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
-> <function div at 0xDEADBEEF>
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
return 1 / var
|
||||
-> '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python2 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function shallow at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
[36m│ │ └ 15[m
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function deep at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m │ └ 52[m
|
||||
[36m └ 17[m
|
||||
@ -30,13 +30,13 @@ python2 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
[36m└ <function div at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
[33;1mreturn[m _deep([31m'天'[m)
|
||||
[36m └ <function _deep at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
[33;1mreturn[m [31m1[m / val
|
||||
[36m └ '天'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -69,56 +69,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m │ │ └ 5[m
|
||||
[36m │ └ 5[m
|
||||
[36m └ 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m │ │ └ 5[m
|
||||
[36m │ └ 5[m
|
||||
[36m └ 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
|
||||
@ -128,19 +134,19 @@ python2 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m└ <function bar3 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, in bar3
|
||||
[33;1mraise[m [35;1mException[m([31m'this is a test exception'[m)
|
||||
Exception: this is a test exception
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m└ <function bar4 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
[33;1massert[m baz == [31m90[m
|
||||
[36m └ 52[m
|
||||
AssertionError: [33;1massert[m baz == [31m90[m
|
||||
@ -152,10 +158,10 @@ python2 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
[36m└ <function ...[m
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m └ '999999999...[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -166,10 +172,10 @@ python2 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
[36m└ <function div at 0xDEADBEEF>[m
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m └ '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python2 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, 15)
|
||||
│ └ 2
|
||||
└ <function shallow at 0xDEADBEEF>
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
│ │ └ 15
|
||||
│ └ 2
|
||||
└ <function deep at 0xDEADBEEF>
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
assert val > 10 and foo == 60
|
||||
│ └ 52
|
||||
└ 17
|
||||
@ -30,13 +30,13 @@ python2 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
└ <function div at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
return _deep("天")
|
||||
└ <function _deep at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
return 1 / val
|
||||
└ '天'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -69,56 +69,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
│ │ └ 5
|
||||
│ └ 5
|
||||
└ 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
│ │ └ 5
|
||||
│ └ 5
|
||||
└ 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -128,19 +134,19 @@ python2 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
└ <function bar3 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, 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
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
└ <function bar4 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
assert baz == 90
|
||||
└ 52
|
||||
AssertionError: assert baz == 90
|
||||
@ -152,10 +158,10 @@ python2 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
└ <function ...
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
return 1 / var
|
||||
└ '999999999...
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -166,10 +172,10 @@ python2 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
└ <function div at 0xDEADBEEF>
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
return 1 / var
|
||||
└ '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python2 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m| -> 2[m
|
||||
[36m-> <function shallow at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
[36m| | -> 15[m
|
||||
[36m| -> 2[m
|
||||
[36m-> <function deep at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m | -> 52[m
|
||||
[36m -> 17[m
|
||||
@ -30,13 +30,13 @@ python2 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
[36m-> <function div at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
[33;1mreturn[m _deep([31m'天'[m)
|
||||
[36m -> <function _deep at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
[33;1mreturn[m [31m1[m / val
|
||||
[36m -> '天'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -69,56 +69,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m | | -> 5[m
|
||||
[36m | -> 5[m
|
||||
[36m -> 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m | | -> 5[m
|
||||
[36m | -> 5[m
|
||||
[36m -> 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
|
||||
@ -128,19 +134,19 @@ python2 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m-> <function bar3 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, in bar3
|
||||
[33;1mraise[m [35;1mException[m([31m'this is a test exception'[m)
|
||||
Exception: this is a test exception
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m-> <function bar4 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
[33;1massert[m baz == [31m90[m
|
||||
[36m -> 52[m
|
||||
AssertionError: [33;1massert[m baz == [31m90[m
|
||||
@ -152,10 +158,10 @@ python2 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
[36m-> <function ...[m
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m -> '999999999...[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -166,10 +172,10 @@ python2 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
[36m-> <function div at 0xDEADBEEF>[m
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m -> '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python2 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, 15)
|
||||
| -> 2
|
||||
-> <function shallow at 0xDEADBEEF>
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
| | -> 15
|
||||
| -> 2
|
||||
-> <function deep at 0xDEADBEEF>
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
assert val > 10 and foo == 60
|
||||
| -> 52
|
||||
-> 17
|
||||
@ -30,13 +30,13 @@ python2 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
-> <function div at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
return _deep("天")
|
||||
-> <function _deep at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
return 1 / val
|
||||
-> '天'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -69,56 +69,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
| | -> 5
|
||||
| -> 5
|
||||
-> 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
| | -> 5
|
||||
| -> 5
|
||||
-> 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -128,19 +134,19 @@ python2 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
-> <function bar3 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, 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
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
-> <function bar4 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
assert baz == 90
|
||||
-> 52
|
||||
AssertionError: assert baz == 90
|
||||
@ -152,10 +158,10 @@ python2 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
-> <function ...
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
return 1 / var
|
||||
-> '999999999...
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -166,10 +172,10 @@ python2 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
-> <function div at 0xDEADBEEF>
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
return 1 / var
|
||||
-> '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python2 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function shallow at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
[36m│ │ └ 15[m
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function deep at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m │ └ 52[m
|
||||
[36m └ 17[m
|
||||
@ -30,13 +30,13 @@ python2 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
[36m└ <function div at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
[33;1mreturn[m _deep([31m'天'[m)
|
||||
[36m └ <function _deep at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
[33;1mreturn[m [31m1[m / val
|
||||
[36m └ '天'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -69,56 +69,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m │ │ └ 5[m
|
||||
[36m │ └ 5[m
|
||||
[36m └ 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m │ │ └ 5[m
|
||||
[36m │ └ 5[m
|
||||
[36m └ 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
|
||||
@ -128,19 +134,19 @@ python2 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m└ <function bar3 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, in bar3
|
||||
[33;1mraise[m [35;1mException[m([31m'this is a test exception'[m)
|
||||
Exception: this is a test exception
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m└ <function bar4 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
[33;1massert[m baz == [31m90[m
|
||||
[36m └ 52[m
|
||||
AssertionError: [33;1massert[m baz == [31m90[m
|
||||
@ -152,10 +158,10 @@ python2 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
[36m└ <function ...[m
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m └ '999999999...[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -166,10 +172,10 @@ python2 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
[36m└ <function div at 0xDEADBEEF>[m
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m └ '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python2 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, 15)
|
||||
│ └ 2
|
||||
└ <function shallow at 0xDEADBEEF>
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
│ │ └ 15
|
||||
│ └ 2
|
||||
└ <function deep at 0xDEADBEEF>
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
assert val > 10 and foo == 60
|
||||
│ └ 52
|
||||
└ 17
|
||||
@ -30,13 +30,13 @@ python2 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
└ <function div at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
return _deep("天")
|
||||
└ <function _deep at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
return 1 / val
|
||||
└ '天'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -69,56 +69,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
│ │ └ 5
|
||||
│ └ 5
|
||||
└ 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
│ │ └ 5
|
||||
│ └ 5
|
||||
└ 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -128,19 +134,19 @@ python2 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
└ <function bar3 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, 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
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
└ <function bar4 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
assert baz == 90
|
||||
└ 52
|
||||
AssertionError: assert baz == 90
|
||||
@ -152,10 +158,10 @@ python2 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
└ <function ...
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
return 1 / var
|
||||
└ '999999999...
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -166,10 +172,10 @@ python2 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
└ <function div at 0xDEADBEEF>
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
return 1 / var
|
||||
└ '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python2 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m| -> 2[m
|
||||
[36m-> <function shallow at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
[36m| | -> 15[m
|
||||
[36m| -> 2[m
|
||||
[36m-> <function deep at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m | -> 52[m
|
||||
[36m -> 17[m
|
||||
@ -30,13 +30,13 @@ python2 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
[36m-> <function div at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
[33;1mreturn[m _deep([31m'天'[m)
|
||||
[36m -> <function _deep at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
[33;1mreturn[m [31m1[m / val
|
||||
[36m -> '天'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -69,56 +69,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m | | -> 5[m
|
||||
[36m | -> 5[m
|
||||
[36m -> 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m | | -> 5[m
|
||||
[36m | -> 5[m
|
||||
[36m -> 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m [35;1mFalse[m
|
||||
why hello there
|
||||
|
||||
|
||||
@ -128,19 +134,19 @@ python2 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m-> <function bar3 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, in bar3
|
||||
[33;1mraise[m [35;1mException[m([31m'this is a test exception'[m)
|
||||
Exception: this is a test exception
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m-> <function bar4 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
[33;1massert[m baz == [31m90[m
|
||||
[36m -> 52[m
|
||||
AssertionError: [33;1massert[m baz == [31m90[m
|
||||
@ -152,10 +158,10 @@ python2 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
[36m-> <function ...[m
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m -> '999999999...[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -166,10 +172,10 @@ python2 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
[36m-> <function div at 0xDEADBEEF>[m
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m -> '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python2 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, 15)
|
||||
| -> 2
|
||||
-> <function shallow at 0xDEADBEEF>
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
| | -> 15
|
||||
| -> 2
|
||||
-> <function deep at 0xDEADBEEF>
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
assert val > 10 and foo == 60
|
||||
| -> 52
|
||||
-> 17
|
||||
@ -30,13 +30,13 @@ python2 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
-> <function div at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
return _deep("天")
|
||||
-> <function _deep at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
return 1 / val
|
||||
-> '天'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -69,56 +69,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
| | -> 5
|
||||
| -> 5
|
||||
-> 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
| | -> 5
|
||||
| -> 5
|
||||
-> 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -128,19 +134,19 @@ python2 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
-> <function bar3 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, 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
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
-> <function bar4 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
assert baz == 90
|
||||
-> 52
|
||||
AssertionError: assert baz == 90
|
||||
@ -152,10 +158,10 @@ python2 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
-> <function ...
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
return 1 / var
|
||||
-> '999999999...
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -166,10 +172,10 @@ python2 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
-> <function div at 0xDEADBEEF>
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
return 1 / var
|
||||
-> '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python3 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function shallow at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
[36m│ │ └ 15[m
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function deep at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m │ └ 52[m
|
||||
[36m └ 17[m
|
||||
@ -30,13 +30,13 @@ python3 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
[36m└ <function div at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
[33;1mreturn[m _deep([31m'天'[m)
|
||||
[36m └ <function _deep at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
[33;1mreturn[m [31m1[m / val
|
||||
[36m └ '天'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -68,56 +68,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m │ │ └ 5[m
|
||||
[36m │ └ 5[m
|
||||
[36m └ 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m │ │ └ 5[m
|
||||
[36m │ └ 5[m
|
||||
[36m └ 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -127,19 +133,19 @@ python3 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m└ <function bar3 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, in bar3
|
||||
[33;1mraise[m [35;1mException[m([31m'this is a test exception'[m)
|
||||
Exception: this is a test exception
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m└ <function bar4 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
[33;1massert[m baz == [31m90[m
|
||||
[36m └ 52[m
|
||||
AssertionError: [33;1massert[m baz == [31m90[m
|
||||
@ -151,10 +157,10 @@ python3 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
[36m└ <function ...[m
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m └ '999999999...[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -165,10 +171,10 @@ python3 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
[36m└ <function div at 0xDEADBEEF>[m
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m └ '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python3 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, 15)
|
||||
│ └ 2
|
||||
└ <function shallow at 0xDEADBEEF>
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
│ │ └ 15
|
||||
│ └ 2
|
||||
└ <function deep at 0xDEADBEEF>
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
assert val > 10 and foo == 60
|
||||
│ └ 52
|
||||
└ 17
|
||||
@ -30,13 +30,13 @@ python3 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
└ <function div at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
return _deep("天")
|
||||
└ <function _deep at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
return 1 / val
|
||||
└ '天'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -68,56 +68,62 @@ AssertionError: assert a > 10
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
│ │ └ 5
|
||||
│ └ 5
|
||||
└ 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
│ │ └ 5
|
||||
│ └ 5
|
||||
└ 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -127,19 +133,19 @@ python3 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
└ <function bar3 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, 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
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
└ <function bar4 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
assert baz == 90
|
||||
└ 52
|
||||
AssertionError: assert baz == 90
|
||||
@ -151,10 +157,10 @@ python3 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
└ <function ...
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
return 1 / var
|
||||
└ '999999999...
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -165,10 +171,10 @@ python3 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
└ <function div at 0xDEADBEEF>
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
return 1 / var
|
||||
└ '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python3 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m| -> 2[m
|
||||
[36m-> <function shallow at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
[36m| | -> 15[m
|
||||
[36m| -> 2[m
|
||||
[36m-> <function deep at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m | -> 52[m
|
||||
[36m -> 17[m
|
||||
@ -30,13 +30,13 @@ python3 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
[36m-> <function div at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
[33;1mreturn[m _deep([31m'天'[m)
|
||||
[36m -> <function _deep at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
[33;1mreturn[m [31m1[m / val
|
||||
[36m -> '天'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -68,56 +68,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m | | -> 5[m
|
||||
[36m | -> 5[m
|
||||
[36m -> 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m | | -> 5[m
|
||||
[36m | -> 5[m
|
||||
[36m -> 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -127,19 +133,19 @@ python3 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m-> <function bar3 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, in bar3
|
||||
[33;1mraise[m [35;1mException[m([31m'this is a test exception'[m)
|
||||
Exception: this is a test exception
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m-> <function bar4 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
[33;1massert[m baz == [31m90[m
|
||||
[36m -> 52[m
|
||||
AssertionError: [33;1massert[m baz == [31m90[m
|
||||
@ -151,10 +157,10 @@ python3 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
[36m-> <function ...[m
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m -> '999999999...[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -165,10 +171,10 @@ python3 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
[36m-> <function div at 0xDEADBEEF>[m
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m -> '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python3 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, 15)
|
||||
| -> 2
|
||||
-> <function shallow at 0xDEADBEEF>
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
| | -> 15
|
||||
| -> 2
|
||||
-> <function deep at 0xDEADBEEF>
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
assert val > 10 and foo == 60
|
||||
| -> 52
|
||||
-> 17
|
||||
@ -30,13 +30,13 @@ python3 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
-> <function div at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
return _deep("天")
|
||||
-> <function _deep at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
return 1 / val
|
||||
-> '天'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -68,56 +68,62 @@ AssertionError: assert a > 10
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
| | -> 5
|
||||
| -> 5
|
||||
-> 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
| | -> 5
|
||||
| -> 5
|
||||
-> 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -127,19 +133,19 @@ python3 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
-> <function bar3 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, 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
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
-> <function bar4 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
assert baz == 90
|
||||
-> 52
|
||||
AssertionError: assert baz == 90
|
||||
@ -151,10 +157,10 @@ python3 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
-> <function ...
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
return 1 / var
|
||||
-> '999999999...
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -165,10 +171,10 @@ python3 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
-> <function div at 0xDEADBEEF>
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
return 1 / var
|
||||
-> '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python3 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function shallow at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
[36m│ │ └ 15[m
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function deep at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m │ └ 52[m
|
||||
[36m └ 17[m
|
||||
@ -30,13 +30,13 @@ python3 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
[36m└ <function div at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
[33;1mreturn[m _deep([31m'天'[m)
|
||||
[36m └ <function _deep at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
[33;1mreturn[m [31m1[m / val
|
||||
[36m └ '天'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -68,56 +68,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m │ │ └ 5[m
|
||||
[36m │ └ 5[m
|
||||
[36m └ 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m │ │ └ 5[m
|
||||
[36m │ └ 5[m
|
||||
[36m └ 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -127,19 +133,19 @@ python3 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m└ <function bar3 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, in bar3
|
||||
[33;1mraise[m [35;1mException[m([31m'this is a test exception'[m)
|
||||
Exception: this is a test exception
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m└ <function bar4 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
[33;1massert[m baz == [31m90[m
|
||||
[36m └ 52[m
|
||||
AssertionError: [33;1massert[m baz == [31m90[m
|
||||
@ -151,10 +157,10 @@ python3 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
[36m└ <function ...[m
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m └ '999999999...[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -165,10 +171,10 @@ python3 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
[36m└ <function div at 0xDEADBEEF>[m
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m └ '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python3 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, 15)
|
||||
│ └ 2
|
||||
└ <function shallow at 0xDEADBEEF>
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
│ │ └ 15
|
||||
│ └ 2
|
||||
└ <function deep at 0xDEADBEEF>
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
assert val > 10 and foo == 60
|
||||
│ └ 52
|
||||
└ 17
|
||||
@ -30,13 +30,13 @@ python3 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
└ <function div at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
return _deep("天")
|
||||
└ <function _deep at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
return 1 / val
|
||||
└ '天'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -68,56 +68,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
│ │ └ 5
|
||||
│ └ 5
|
||||
└ 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
│ │ └ 5
|
||||
│ └ 5
|
||||
└ 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -127,19 +133,19 @@ python3 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
└ <function bar3 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, 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
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
└ <function bar4 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
assert baz == 90
|
||||
└ 52
|
||||
AssertionError: assert baz == 90
|
||||
@ -151,10 +157,10 @@ python3 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
└ <function ...
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
return 1 / var
|
||||
└ '999999999...
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -165,10 +171,10 @@ python3 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
└ <function div at 0xDEADBEEF>
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
return 1 / var
|
||||
└ '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python3 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m| -> 2[m
|
||||
[36m-> <function shallow at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
[36m| | -> 15[m
|
||||
[36m| -> 2[m
|
||||
[36m-> <function deep at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m | -> 52[m
|
||||
[36m -> 17[m
|
||||
@ -30,13 +30,13 @@ python3 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
[36m-> <function div at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
[33;1mreturn[m _deep([31m'天'[m)
|
||||
[36m -> <function _deep at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
[33;1mreturn[m [31m1[m / val
|
||||
[36m -> '天'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -68,56 +68,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m | | -> 5[m
|
||||
[36m | -> 5[m
|
||||
[36m -> 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m | | -> 5[m
|
||||
[36m | -> 5[m
|
||||
[36m -> 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -127,19 +133,19 @@ python3 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m-> <function bar3 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, in bar3
|
||||
[33;1mraise[m [35;1mException[m([31m'this is a test exception'[m)
|
||||
Exception: this is a test exception
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m-> <function bar4 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
[33;1massert[m baz == [31m90[m
|
||||
[36m -> 52[m
|
||||
AssertionError: [33;1massert[m baz == [31m90[m
|
||||
@ -151,10 +157,10 @@ python3 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
[36m-> <function ...[m
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m -> '999999999...[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -165,10 +171,10 @@ python3 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
[36m-> <function div at 0xDEADBEEF>[m
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m -> '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python3 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, 15)
|
||||
| -> 2
|
||||
-> <function shallow at 0xDEADBEEF>
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
| | -> 15
|
||||
| -> 2
|
||||
-> <function deep at 0xDEADBEEF>
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
assert val > 10 and foo == 60
|
||||
| -> 52
|
||||
-> 17
|
||||
@ -30,13 +30,13 @@ python3 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
-> <function div at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
return _deep("天")
|
||||
-> <function _deep at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
return 1 / val
|
||||
-> '天'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -68,56 +68,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
| | -> 5
|
||||
| -> 5
|
||||
-> 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
| | -> 5
|
||||
| -> 5
|
||||
-> 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -127,19 +133,19 @@ python3 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
-> <function bar3 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, 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
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
-> <function bar4 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
assert baz == 90
|
||||
-> 52
|
||||
AssertionError: assert baz == 90
|
||||
@ -151,10 +157,10 @@ python3 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
-> <function ...
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
return 1 / var
|
||||
-> '999999999...
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -165,10 +171,10 @@ python3 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
-> <function div at 0xDEADBEEF>
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
return 1 / var
|
||||
-> '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python3 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function shallow at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
[36m│ │ └ 15[m
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function deep at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m │ └ 52[m
|
||||
[36m └ 17[m
|
||||
@ -30,13 +30,13 @@ python3 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
[36m└ <function div at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
[33;1mreturn[m _deep([31m'天'[m)
|
||||
[36m └ <function _deep at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
[33;1mreturn[m [31m1[m / val
|
||||
[36m └ '天'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -68,56 +68,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m │ │ └ 5[m
|
||||
[36m │ └ 5[m
|
||||
[36m └ 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m │ │ └ 5[m
|
||||
[36m │ └ 5[m
|
||||
[36m └ 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m │ │ └ 'why hello there'[m
|
||||
[36m │ └ 'why hello there'[m
|
||||
[36m └ 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m └ <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -127,19 +133,19 @@ python3 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m└ <function bar3 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, in bar3
|
||||
[33;1mraise[m [35;1mException[m([31m'this is a test exception'[m)
|
||||
Exception: this is a test exception
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m└ <function bar4 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
[33;1massert[m baz == [31m90[m
|
||||
[36m └ 52[m
|
||||
AssertionError: [33;1massert[m baz == [31m90[m
|
||||
@ -151,10 +157,10 @@ python3 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
[36m└ <function ...[m
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m └ '999999999...[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -165,10 +171,10 @@ python3 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
[36m└ <function div at 0xDEADBEEF>[m
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m └ '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python3 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, 15)
|
||||
│ └ 2
|
||||
└ <function shallow at 0xDEADBEEF>
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
│ │ └ 15
|
||||
│ └ 2
|
||||
└ <function deep at 0xDEADBEEF>
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
assert val > 10 and foo == 60
|
||||
│ └ 52
|
||||
└ 17
|
||||
@ -30,13 +30,13 @@ python3 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
└ <function div at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
return _deep("天")
|
||||
└ <function _deep at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
return 1 / val
|
||||
└ '天'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -68,56 +68,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
│ │ └ 5
|
||||
│ └ 5
|
||||
└ 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
│ │ └ 5
|
||||
│ └ 5
|
||||
└ 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
│ │ └ 'why hello there'
|
||||
│ └ 'why hello there'
|
||||
└ 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
└ <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -127,19 +133,19 @@ python3 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
└ <function bar3 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, 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
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
└ <function bar4 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
assert baz == 90
|
||||
└ 52
|
||||
AssertionError: assert baz == 90
|
||||
@ -151,10 +157,10 @@ python3 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
└ <function ...
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
return 1 / var
|
||||
└ '999999999...
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -165,10 +171,10 @@ python3 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
└ <function div at 0xDEADBEEF>
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
return 1 / var
|
||||
└ '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python3 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m| -> 2[m
|
||||
[36m-> <function shallow at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
[36m| | -> 15[m
|
||||
[36m| -> 2[m
|
||||
[36m-> <function deep at 0xDEADBEEF>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m | -> 52[m
|
||||
[36m -> 17[m
|
||||
@ -30,13 +30,13 @@ python3 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
[36m-> <function div at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
[33;1mreturn[m _deep([31m'天'[m)
|
||||
[36m -> <function _deep at 0xDEADBEEF>[m
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
[33;1mreturn[m [31m1[m / val
|
||||
[36m -> '天'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -68,56 +68,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m | | -> 5[m
|
||||
[36m | -> 5[m
|
||||
[36m -> 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
[33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m | | -> 5[m
|
||||
[36m | -> 5[m
|
||||
[36m -> 5[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m5[m; [33;1massert[m a > [31m10[m [2;37m# this should work fine[m
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<string>", line 1, in <module>
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m | | -> 'why hello there'[m
|
||||
[36m | -> 'why hello there'[m
|
||||
[36m -> 'why hello there'[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
[36m -> <module 'test_module' from '/removed/for/test/purposes.py'>[m
|
||||
AssertionError: from __future__ import print_function; [33;1mimport[m better_exceptions; better_exceptions.hook(); a = [31m'why hello '[m + [31m' there'[m; [35;1mprint[m(a); [33;1massert[m False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -127,19 +133,19 @@ python3 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m-> <function bar3 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, in bar3
|
||||
[33;1mraise[m [35;1mException[m([31m'this is a test exception'[m)
|
||||
Exception: this is a test exception
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
[36m-> <function bar4 at 0xDEADBEEF>[m
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
[33;1massert[m baz == [31m90[m
|
||||
[36m -> 52[m
|
||||
AssertionError: [33;1massert[m baz == [31m90[m
|
||||
@ -151,10 +157,10 @@ python3 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
[36m-> <function ...[m
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m -> '999999999...[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -165,10 +171,10 @@ python3 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
[36m-> <function div at 0xDEADBEEF>[m
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
[33;1mreturn[m [31m1[m / var
|
||||
[36m -> '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'[m
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -2,16 +2,16 @@ python3 test/test.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
File "test/test.py", line 17, in <module>
|
||||
shallow(bar, 15)
|
||||
| -> 2
|
||||
-> <function shallow at 0xDEADBEEF>
|
||||
File "test/test.py", line 7, in shallow
|
||||
File "test/test.py", line 8, in shallow
|
||||
deep(a + b)
|
||||
| | -> 15
|
||||
| -> 2
|
||||
-> <function deep at 0xDEADBEEF>
|
||||
File "test/test.py", line 12, in deep
|
||||
File "test/test.py", line 13, in deep
|
||||
assert val > 10 and foo == 60
|
||||
| -> 52
|
||||
-> 17
|
||||
@ -30,13 +30,13 @@ python3 test/test_encoding.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_encoding.py", line 13, in <module>
|
||||
File "test/test_encoding.py", line 14, in <module>
|
||||
div()
|
||||
-> <function div at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 10, in div
|
||||
File "test/test_encoding.py", line 11, in div
|
||||
return _deep("天")
|
||||
-> <function _deep at 0xDEADBEEF>
|
||||
File "test/test_encoding.py", line 7, in _deep
|
||||
File "test/test_encoding.py", line 8, in _deep
|
||||
return 1 / val
|
||||
-> '天'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -68,56 +68,62 @@ AssertionError: [33;1massert[m a > [31m10[m
|
||||
|
||||
|
||||
|
||||
import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
| | -> 5
|
||||
| -> 5
|
||||
-> 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); 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
|
||||
import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
| | -> 5
|
||||
| -> 5
|
||||
-> 5
|
||||
AssertionError: import better_exceptions; a = 5; assert a > 10 # this should work fine
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); 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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
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
|
||||
from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
| | -> 'why hello there'
|
||||
| -> 'why hello there'
|
||||
-> 'why hello there'
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False
|
||||
-> <module 'test_module' from '/removed/for/test/purposes.py'>
|
||||
AssertionError: from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False
|
||||
why hello there
|
||||
|
||||
|
||||
@ -127,19 +133,19 @@ python3 test/test_logging.py
|
||||
|
||||
ERROR:__main__:callback failed
|
||||
Traceback (most recent call last):
|
||||
File "test/test_logging.py", line 15, in foo
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
-> <function bar3 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 32, in bar3
|
||||
File "test/test_logging.py", line 33, 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
|
||||
File "test/test_logging.py", line 16, in foo
|
||||
cb()
|
||||
-> <function bar4 at 0xDEADBEEF>
|
||||
File "test/test_logging.py", line 37, in bar4
|
||||
File "test/test_logging.py", line 38, in bar4
|
||||
assert baz == 90
|
||||
-> 52
|
||||
AssertionError: assert baz == 90
|
||||
@ -151,10 +157,10 @@ python3 test/test_truncating.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating.py", line 11, in <module>
|
||||
File "test/test_truncating.py", line 12, in <module>
|
||||
div()
|
||||
-> <function ...
|
||||
File "test/test_truncating.py", line 8, in div
|
||||
File "test/test_truncating.py", line 9, in div
|
||||
return 1 / var
|
||||
-> '999999999...
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
@ -165,10 +171,10 @@ python3 test/test_truncating_disabled.py
|
||||
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "test/test_truncating_disabled.py", line 11, in <module>
|
||||
File "test/test_truncating_disabled.py", line 12, in <module>
|
||||
div()
|
||||
-> <function div at 0xDEADBEEF>
|
||||
File "test/test_truncating_disabled.py", line 8, in div
|
||||
File "test/test_truncating_disabled.py", line 9, in div
|
||||
return 1 / var
|
||||
-> '999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
|
||||
TypeError: unsupported operand type(s) for /: 'int' and 'str'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import better_exceptions
|
||||
better_exceptions.hook()
|
||||
|
||||
foo = 52
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
Traceback (most recent call last):
|
||||
File "test/test.py", line 16, in <module>
|
||||
shallow(bar, [31m15[m)
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function shallow at 0x104f7f6e0>[m
|
||||
File "test/test.py", line 7, in shallow
|
||||
deep(a + b)
|
||||
[36m│ │ └ 15[m
|
||||
[36m│ └ 2[m
|
||||
[36m└ <function deep at 0x104f7f758>[m
|
||||
File "test/test.py", line 12, in deep
|
||||
[33;1massert[m val > [31m10[m and foo == [31m60[m
|
||||
[36m │ └ 52[m
|
||||
[36m └ 17[m
|
||||
AssertionError: [33;1massert[m val > [31m10[m and foo == [31m60[m
|
@ -1,6 +1,7 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
import better_exceptions
|
||||
better_exceptions.hook()
|
||||
|
||||
|
||||
def _deep(val):
|
||||
|
@ -1,6 +1,7 @@
|
||||
import better_exceptions
|
||||
import logging
|
||||
|
||||
better_exceptions.hook()
|
||||
logging.basicConfig()
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -17,6 +17,6 @@ function test_str {
|
||||
"${BETEXC_PYTHON}" -c"$cmd" "${@}" || true
|
||||
}
|
||||
|
||||
test_str 'import better_exceptions; a = 5; assert a > 10 # this should work fine' these extra arguments should be removed and should not show up 'in' the output
|
||||
test_str 'from __future__ import print_function; import better_exceptions; a = "why hello there"; print(a); assert False'
|
||||
test_str 'from __future__ import print_function; import better_exceptions; a = "why hello " + " there"; print(a); assert False'
|
||||
test_str 'import better_exceptions; better_exceptions.hook(); a = 5; assert a > 10 # this should work fine' these extra arguments should be removed and should not show up 'in' the output
|
||||
test_str 'from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello there"; print(a); assert False'
|
||||
test_str 'from __future__ import print_function; import better_exceptions; better_exceptions.hook(); a = "why hello " + " there"; print(a); assert False'
|
||||
|
@ -1,6 +1,7 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
import better_exceptions
|
||||
better_exceptions.hook()
|
||||
better_exceptions.MAX_LENGTH = 10
|
||||
|
||||
def div():
|
||||
|
@ -1,6 +1,7 @@
|
||||
# -*- coding:utf-8 -*-
|
||||
|
||||
import better_exceptions
|
||||
better_exceptions.hook()
|
||||
better_exceptions.MAX_LENGTH = None
|
||||
|
||||
def div():
|
||||
|
@ -17,7 +17,7 @@ export PYTHONPATH
|
||||
function normalize {
|
||||
# we translate anything that looks like an address into 0xDEADBEEF
|
||||
# since the addresses change from run to run and break diff testing
|
||||
cat | sed 's|0x[a-fA-F0-9]\{1,\}|0xDEADBEEF|g' | sed 's|File "/[^"]*"|File "/removed/for/test/purposes.ext"|g' | grep -v "bash: warning:"
|
||||
cat | sed 's|0x[a-fA-F0-9]\{1,\}|0xDEADBEEF|g' | sed 's|<module '"'[^']*' from '[^']*'>|<module 'test_module' from '/removed/for/test/purposes.py'>"'|g' | sed 's|File "/[^"]*"|File "/removed/for/test/purposes.ext"|g' | grep -v "bash: warning:"
|
||||
}
|
||||
|
||||
function test_case {
|
||||
|
Loading…
Reference in New Issue
Block a user