mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
chore: update test runner to not show traceback if tests fail
This commit is contained in:
parent
8dfcbf1dea
commit
0c2c8d1061
2 changed files with 8 additions and 6 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env xonsh
|
#!/usr/bin/env xonsh
|
||||||
import argparse
|
import argparse
|
||||||
|
import subprocess
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +8,7 @@ $XONSH_DEBUG = 1
|
||||||
$RAISE_SUBPROC_ERROR = True
|
$RAISE_SUBPROC_ERROR = True
|
||||||
|
|
||||||
|
|
||||||
def _replace_args(args:List[str], num:int) -> List[str]:
|
def _replace_args(args: List[str], num: int) -> List[str]:
|
||||||
return [
|
return [
|
||||||
(arg % num) if "%d" in arg else arg
|
(arg % num) if "%d" in arg else arg
|
||||||
for arg in args
|
for arg in args
|
||||||
|
@ -72,4 +73,7 @@ if __name__ == '__main__':
|
||||||
qa_parser.set_defaults(func=qa)
|
qa_parser.set_defaults(func=qa)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
args.func(args)
|
try:
|
||||||
|
args.func(args)
|
||||||
|
except subprocess.CalledProcessError as ex:
|
||||||
|
parser.exit(1, f"Failed with {ex}")
|
||||||
|
|
|
@ -19,8 +19,7 @@ exclude =
|
||||||
feedstock,
|
feedstock,
|
||||||
rever,
|
rever,
|
||||||
.venv*/,
|
.venv*/,
|
||||||
# remove later
|
.local.out*/
|
||||||
pygments_cache.py
|
|
||||||
# lint nits that are acceptable in Xonsh project:
|
# lint nits that are acceptable in Xonsh project:
|
||||||
ignore =
|
ignore =
|
||||||
D100, # Missing docstring in public module
|
D100, # Missing docstring in public module
|
||||||
|
@ -46,8 +45,7 @@ ignore =
|
||||||
D411, # Missing blank line before section
|
D411, # Missing blank line before section
|
||||||
D407, # Missing dashed underline after section
|
D407, # Missing dashed underline after section
|
||||||
E122,
|
E122,
|
||||||
# E203 whitespace before ':'
|
E203, # whitespace before ':'
|
||||||
E203,
|
|
||||||
E402,
|
E402,
|
||||||
W503, # line break before binary operators is a good thing
|
W503, # line break before binary operators is a good thing
|
||||||
E731, # accept lambda assigned to a variable
|
E731, # accept lambda assigned to a variable
|
||||||
|
|
Loading…
Add table
Reference in a new issue