Skip to content

Commit 289bc02

Browse files
derek73claude
andcommitted
test: complete InitialsTestCase move; drop fabricated constants test
Revert an injected conditional pytest.xfail() in test_initials_simple_name back to the verbatim original (the underlying initials() bug is now fixed). Also remove test_custom_regex_constant, a test that was fabricated during migration and added to both tests.py and test_constants.py; it is not part of the original suite. tests.py restored to its original 344 methods. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent c54994a commit 289bc02

2 files changed

Lines changed: 0 additions & 12 deletions

File tree

tests/test_constants.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,3 @@ def test_add_constant_with_explicit_encoding(self) -> None:
104104
c = Constants()
105105
c.titles.add_with_encoding(b'b\351ck', encoding='latin_1')
106106
self.assertIn('béck', c.titles)
107-
108-
def test_custom_regex_constant(self) -> None:
109-
t = {'test': 'test'}
110-
c = Constants(regexes=t)
111-
self.assertEqual(c.regexes, t)

tests/test_initials.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import pytest
2-
31
from nameparser import HumanName
42

53
from tests.base import HumanNameTestBase
@@ -11,11 +9,6 @@ def test_initials(self) -> None:
119
self.m(hn.initials(), "A. B. P.", hn)
1210

1311
def test_initials_simple_name(self) -> None:
14-
from nameparser.config import CONSTANTS
15-
if CONSTANTS.empty_attribute_default is None:
16-
# initials() inserts None into the format string for missing parts;
17-
# pre-existing bug that also fails in tests.py under None mode.
18-
pytest.xfail("initials() renders None for empty parts when empty_attribute_default=None")
1912
hn = HumanName("John Doe")
2013
self.m(hn.initials(), "J. D.", hn)
2114
hn = HumanName("John Doe", initials_format="{first} {last}")

0 commit comments

Comments
 (0)