diff options
author | Ram Rachum <ram@rachum.com> | 2020-06-19 12:53:44 +0300 |
---|---|---|
committer | Ram Rachum <ram@rachum.com> | 2020-06-19 22:02:24 +0300 |
commit | dd446bee5eb2d3ab0976309803dc77821eeac93e (patch) | |
tree | 0a55083f63eccafc4bc5c4e80fce89c043968b86 /src/_pytest/debugging.py | |
parent | 4cc4ebf3c9f79eb9d7484c763b11dea3ddff4b82 (diff) | |
download | pytest-dd446bee5eb2d3ab0976309803dc77821eeac93e.tar.gz |
Fix exception causes all over the codebase
Diffstat (limited to 'src/_pytest/debugging.py')
-rw-r--r-- | src/_pytest/debugging.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/_pytest/debugging.py b/src/_pytest/debugging.py index 0567927c0..63126cbe0 100644 --- a/src/_pytest/debugging.py +++ b/src/_pytest/debugging.py @@ -28,10 +28,10 @@ def _validate_usepdb_cls(value: str) -> Tuple[str, str]: """Validate syntax of --pdbcls option.""" try: modname, classname = value.split(":") - except ValueError: + except ValueError as e: raise argparse.ArgumentTypeError( "{!r} is not in the format 'modname:classname'".format(value) - ) + ) from e return (modname, classname) @@ -130,7 +130,7 @@ class pytestPDB: value = ":".join((modname, classname)) raise UsageError( "--pdbcls: could not import {!r}: {}".format(value, exc) - ) + ) from exc else: import pdb |