Skip to content

Commit bc9281c

Browse files
author
zoedong
committed
Set minimum version for pygments and fix tests
1 parent df3566c commit bc9281c

File tree

3 files changed

+38
-38
lines changed

3 files changed

+38
-38
lines changed

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ install_requires =
2929

3030
setup_requires = setuptools>=44; setuptools_scm[toml]>=3.4.3
3131
include_package_data = True
32-
tests_require = pytest; typeguard; pygments; littleutils
32+
tests_require = pytest; typeguard; pygments>=2.16.0; littleutils
3333

3434
[options.extras_require]
35-
tests = pytest; typeguard; pygments; littleutils; cython
35+
tests = pytest; typeguard; pygments>=2.16.0; littleutils; cython
3636

3737
[coverage:run]
3838
relative_files = True

tests/golden_files/pygmented.txt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Traceback (most recent call last):
22
File "formatter_example.py", line 21, in foo
3-
9 | x = 1
4-
10 | lst = (
3+
9 | x = 1
4+
10 | lst = (
55
11 |  [
66
12 |  x,
77
(...)
8-
18 |  + []
8+
18 |  + []
99
19 | )
1010
20 | try:
1111
--> 21 |  return int(str(lst))
@@ -19,7 +19,7 @@ Traceback (most recent call last):
1919
21 |  return int(str(lst))
2020
22 | except:
2121
23 |  try:
22-
--> 24 |  return 1 / 0
22+
--> 24 |  return 1 / 0
2323
25 |  except Exception as e:
2424
ZeroDivisionError: division by zero
2525

@@ -31,24 +31,24 @@ Traceback (most recent call last):
3131
--> 30 |  exec("foo()")
3232
File "<string>", line 1, in <module>
3333
File "formatter_example.py", line 8, in foo
34-
6 | def foo(n=5):
35-
7 |  if n > 0:
36-
--> 8 |  return foo(n - 1)
37-
9 |  x = 1
34+
6 | def foo(n=5):
35+
7 |  if n > 0:
36+
--> 8 |  return foo(n - 1)
37+
9 |  x = 1
3838
File "formatter_example.py", line 8, in foo
39-
6 | def foo(n=5):
40-
7 |  if n > 0:
41-
--> 8 |  return foo(n - 1)
42-
9 |  x = 1
39+
6 | def foo(n=5):
40+
7 |  if n > 0:
41+
--> 8 |  return foo(n - 1)
42+
9 |  x = 1
4343
[... skipping similar frames: foo at line 8 (2 times)]
4444
File "formatter_example.py", line 8, in foo
45-
6 | def foo(n=5):
46-
7 |  if n > 0:
47-
--> 8 |  return foo(n - 1)
48-
9 |  x = 1
45+
6 | def foo(n=5):
46+
7 |  if n > 0:
47+
--> 8 |  return foo(n - 1)
48+
9 |  x = 1
4949
File "formatter_example.py", line 26, in foo
5050
23 | try:
51-
24 |  return 1 / 0
51+
24 |  return 1 / 0
5252
25 | except Exception as e:
53-
--> 26 |  raise TypeError from e
53+
--> 26 |  raise TypeError from e
5454
TypeError

0 commit comments

Comments
 (0)