File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 44
55import re
66import unittest
7+ try :
8+ from re import PatternError as re_PatternError # Added in 3.13.
9+ except ImportError :
10+ from re import error as re_PatternError
711
812from pathspec .patterns .gitignore .base import (
913 GitIgnorePatternError ,
@@ -944,7 +948,7 @@ def test_15_issue_93_c_2_invalid(self):
944948 'a[z-a]' ,
945949 ]:
946950 with self .subTest (f"p={ raw_pattern !r} " ):
947- with self .assertRaises (re . PatternError ):
951+ with self .assertRaises (re_PatternError ):
948952 GitIgnoreBasicPattern (raw_pattern )
949953
950954 def test_15_issue_93_c_3_unclosed (self ):
Original file line number Diff line number Diff line change 44
55import re
66import unittest
7+ try :
8+ from re import PatternError as re_PatternError # Added in 3.13.
9+ except ImportError :
10+ from re import error as re_PatternError
711
812from pathspec .patterns .gitignore .base import (
913 GitIgnorePatternError ,
@@ -948,7 +952,7 @@ def test_15_issue_93_c_2_invalid(self):
948952 'a[z-a]' ,
949953 ]:
950954 with self .subTest (f"p={ raw_pattern !r} " ):
951- with self .assertRaises (re . PatternError ):
955+ with self .assertRaises (re_PatternError ):
952956 GitIgnoreSpecPattern (raw_pattern )
953957
954958 def test_15_issue_93_c_3_unclosed (self ):
You can’t perform that action at this time.
0 commit comments