Skip to content

Commit 5fa0bb4

Browse files
author
Martin
committed
Fixed PR comments
1 parent ab6daf7 commit 5fa0bb4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test_static/test_regex.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,29 @@ def is_match(s: str):
3838
("e10", False), # No digits before exponent (invalid)
3939
4040
# 4. Edge Cases
41-
("", False), # Empty string
42-
(" ", False), # Whitespace-only
43-
(" 42 ", False), # Spaces around number
41+
("", False), # Empty string (invalid)
42+
(" ", False), # Whitespace-only (invalid)
43+
(" 42 ", False), # Spaces around number (invalid)
4444
("+", False), # Only sign (invalid)
4545
("-", False), # Only sign (invalid)
4646
("++42", False), # Multiple signs (invalid)
4747
("--42", False), # Multiple signs (invalid)
48-
("42abc", False), # Invalid characters in the number
48+
("42abc", False), # Invalid characters in the number (invalid)
4949
5050
# 5. Invalid Formats
51-
("42.5.1", False), # Multiple decimal separators
52-
(".", False), # Only decimal separator
51+
("42.5.1", False), # Multiple decimal separators (invalid)
52+
(".", False), # Only decimal separator (invalid)
5353
("1e", False), # Only scientific notation sign (invalid)
54-
("1e", False), # Scientific notation without exponent
54+
("e", False), # Scientific notation without exponent (invalid)
5555
5656
# 6. Numbers with Commas (International)
5757
("1,000", True), # Number with commas as thousands separators
5858
("1,000.5", False), # Mixed usage of commas and dots (invalid)
5959
6060
# 7. Leading and Trailing Spaces
61-
(" 42", False), # Leading space
61+
(" 42", False), # Leading space (invalid)
6262
("42 ", True), # Trailing space
63-
(" 42.5 ", False), # Leading and trailing spaces
63+
(" 42.5 ", False), # Leading and trailing spaces (invalid)
6464
])
6565

6666
def test_regex_match(test_input, expected):

0 commit comments

Comments
 (0)