File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change
1
+ @ echo off
2
+
3
+ flake8 --show-source pent
Original file line number Diff line number Diff line change @@ -269,7 +269,7 @@ def test_string_and_single_num_capture(self):
269
269
self .assertEqual (m .group (pent .group_prefix + "2" ), v )
270
270
271
271
def number_ending_sentence (self ):
272
- """Check that a number at the end of a sentence is matched correctly."""
272
+ """Check that a number at the end of a sentence matches correctly."""
273
273
import pent
274
274
275
275
from .testdata import number_patterns as npats
@@ -322,6 +322,20 @@ def test_any_token_capture_ranges(self):
322
322
self .assertEqual (m .group (pent .group_prefix + "2" ), test_num )
323
323
self .assertEqual (m .group (pent .group_prefix + "3" ), test_line_end )
324
324
325
+ def test_manual_two_lines (self ):
326
+ """Run manual check on concatenating two single-line regexes."""
327
+ test_str = "This is line one: 12345 \n And this is line two: -3e-5"
328
+
329
+ test_pat_1 = "~! @!.one: #!.+i"
330
+ test_pat_2 = "~! @!.two: #!.-s"
331
+
332
+ cp_1 = self .prs .convert_line (test_pat_1 )
333
+ cp_2 = self .prs .convert_line (test_pat_2 )
334
+
335
+ m = re .search (cp_1 + r"\n" + cp_2 , test_str )
336
+
337
+ self .assertIsNotNone (m )
338
+
325
339
326
340
class TestPentTokens (ut .TestCase , SuperPent ):
327
341
"""Direct tests on the Token class."""
You can’t perform that action at this time.
0 commit comments