SegmentRange: more explicit slice matching (#31451)

* more explicit

* fix it

* use non capturing group

* only needed for regex101

* make test_logreader.py executable

* fix

* stash

* passes test

* none

* type anotate

* test

* fix

* nice for syntax highlighting
This commit is contained in:
Shane Smiskol
2024-02-14 06:36:58 -06:00
committed by GitHub
parent 8fe9bc7a69
commit 796671fe1a
3 changed files with 10 additions and 6 deletions
+4
View File
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
import shutil
import tempfile
import os
@@ -83,6 +84,9 @@ class TestLogReader(unittest.TestCase):
(f"{TEST_ROUTE}/j",),
(f"{TEST_ROUTE}/0:1:2:3",),
(f"{TEST_ROUTE}/:::3",),
(f"{TEST_ROUTE}3",),
(f"{TEST_ROUTE}-3",),
(f"{TEST_ROUTE}--3a",),
])
def test_bad_ranges(self, segment_range):
with self.assertRaises(AssertionError):