diff options
| author | natsuoto <[email protected]> | 2026-07-01 15:36:40 +0530 |
|---|---|---|
| committer | natsuoto <[email protected]> | 2026-07-01 15:36:40 +0530 |
| commit | a7974d090211955c394e0fecbc547f73b7786a97 (patch) | |
| tree | 890106bf873d10604d5d141444519a039441bd14 /tests/pattern/composition.test.py | |
| parent | d46c40de921dd2ba62fbfcd0e2e4591eee8de2a9 (diff) | |
| download | edify-a7974d090211955c394e0fecbc547f73b7786a97.tar.xz edify-a7974d090211955c394e0fecbc547f73b7786a97.zip | |
feat: humre-style functional API — operators, constants, factories, matcher
Diffstat (limited to 'tests/pattern/composition.test.py')
| -rw-r--r-- | tests/pattern/composition.test.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/pattern/composition.test.py b/tests/pattern/composition.test.py index 9cf0003..f58df57 100644 --- a/tests/pattern/composition.test.py +++ b/tests/pattern/composition.test.py @@ -12,14 +12,15 @@ def test_pattern_builds_the_same_element_tree_as_a_builder(): assert pattern._state == builder._state -def test_pattern_has_no_to_regex_terminal(): +def test_pattern_exposes_to_regex_string_terminal(): pattern = Pattern().digit() - assert not hasattr(pattern, "to_regex") + assert pattern.to_regex_string() == "\\d" -def test_pattern_has_no_to_regex_string_terminal(): +def test_pattern_exposes_to_regex_terminal(): pattern = Pattern().digit() - assert not hasattr(pattern, "to_regex_string") + compiled = pattern.to_regex() + assert compiled.pattern == "\\d" def test_pattern_supports_nested_use_composition(): |
