Skip to content

Commit

Permalink
Set minimum version for pygments and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zoedong committed Sep 28, 2023
1 parent df3566c commit bc9281c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ install_requires =

setup_requires = setuptools>=44; setuptools_scm[toml]>=3.4.3
include_package_data = True
tests_require = pytest; typeguard; pygments; littleutils
tests_require = pytest; typeguard; pygments>=2.16.0; littleutils

[options.extras_require]
tests = pytest; typeguard; pygments; littleutils; cython
tests = pytest; typeguard; pygments>=2.16.0; littleutils; cython

[coverage:run]
relative_files = True
Expand Down
36 changes: 18 additions & 18 deletions tests/golden_files/pygmented.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Traceback (most recent call last):
File "formatter_example.py", line 21, in foo
9 | x = 1
10 | lst = (
9 | x = 1
10 | lst = (
11 |  [
12 |  x,
(...)
18 |  + []
18 |  + []
19 | )
20 | try:
--> 21 |  return int(str(lst))
Expand All @@ -19,7 +19,7 @@ Traceback (most recent call last):
21 |  return int(str(lst))
22 | except:
23 |  try:
--> 24 |  return 1 / 0
--> 24 |  return 1 / 0
25 |  except Exception as e:
ZeroDivisionError: division by zero

Expand All @@ -31,24 +31,24 @@ Traceback (most recent call last):
--> 30 |  exec("foo()")
File "<string>", line 1, in <module>
File "formatter_example.py", line 8, in foo
6 | def foo(n=5):
7 |  if n > 0:
--> 8 |  return foo(n - 1)
9 |  x = 1
6 | def foo(n=5):
7 |  if n > 0:
--> 8 |  return foo(n - 1)
9 |  x = 1
File "formatter_example.py", line 8, in foo
6 | def foo(n=5):
7 |  if n > 0:
--> 8 |  return foo(n - 1)
9 |  x = 1
6 | def foo(n=5):
7 |  if n > 0:
--> 8 |  return foo(n - 1)
9 |  x = 1
[... skipping similar frames: foo at line 8 (2 times)]
File "formatter_example.py", line 8, in foo
6 | def foo(n=5):
7 |  if n > 0:
--> 8 |  return foo(n - 1)
9 |  x = 1
6 | def foo(n=5):
7 |  if n > 0:
--> 8 |  return foo(n - 1)
9 |  x = 1
File "formatter_example.py", line 26, in foo
23 | try:
24 |  return 1 / 0
24 |  return 1 / 0
25 | except Exception as e:
--> 26 |  raise TypeError from e
--> 26 |  raise TypeError from e
TypeError
Loading

0 comments on commit bc9281c

Please sign in to comment.