Skip to content

Commit

Permalink
Merge pull request #1893 from Textualize/traceback-coverage
Browse files Browse the repository at this point in the history
Traceback coverage
  • Loading branch information
willmcgugan committed Jan 31, 2022
2 parents 633faab + b1673d0 commit bd11aa5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ repos:
rev: v1.9.0
hooks:
- id: python-check-mock-methods
- id: python-no-eval
- id: python-no-log-warn
- id: python-use-type-annotations
- id: rst-directive-colons
Expand Down
4 changes: 2 additions & 2 deletions tests/test_traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ def test_syntax_error():
console = Console(width=100, file=io.StringIO())
try:
# raises SyntaxError: unexpected EOF while parsing
compile("(2+2")
except Exception:
eval("(2+2")
except SyntaxError:
console.print_exception()
exception_text = console.file.getvalue()
assert "SyntaxError" in exception_text
Expand Down

0 comments on commit bd11aa5

Please sign in to comment.