From c7e0fcfbccc3021415a7c5ac170598a7dc6ee7f6 Mon Sep 17 00:00:00 2001 From: natsuoto <279971144+natsuoto@users.noreply.github.com> Date: Sat, 11 Jul 2026 17:30:53 +0530 Subject: refactor: eliminate suppression comments and internal-import tests, delete now-dead defensive code --- tests/pattern/anchors.test.py | 4 ++-- tests/pattern/boundaries.test.py | 4 ++-- tests/pattern/composition.test.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/pattern') diff --git a/tests/pattern/anchors.test.py b/tests/pattern/anchors.test.py index a42aca0..225e8e9 100644 --- a/tests/pattern/anchors.test.py +++ b/tests/pattern/anchors.test.py @@ -20,8 +20,8 @@ def test_end_compiles_to_dollar_sign(): def test_start_matches_start_of_input_element_from_the_fluent_chain(): - assert START._state == Pattern().start_of_input()._state + assert Pattern().start_of_input() == START def test_end_matches_end_of_input_element_from_the_fluent_chain(): - assert END._state == Pattern().end_of_input()._state + assert Pattern().end_of_input() == END diff --git a/tests/pattern/boundaries.test.py b/tests/pattern/boundaries.test.py index b391733..2892866 100644 --- a/tests/pattern/boundaries.test.py +++ b/tests/pattern/boundaries.test.py @@ -20,8 +20,8 @@ def test_non_word_boundary_compiles_to_backslash_capital_b(): def test_word_boundary_matches_fluent_chain_output(): - assert WORD_BOUNDARY._state == Pattern().word_boundary()._state + assert Pattern().word_boundary() == WORD_BOUNDARY def test_non_word_boundary_matches_fluent_chain_output(): - assert NON_WORD_BOUNDARY._state == Pattern().non_word_boundary()._state + assert Pattern().non_word_boundary() == NON_WORD_BOUNDARY diff --git a/tests/pattern/composition.test.py b/tests/pattern/composition.test.py index 18a6bc2..34d6f89 100644 --- a/tests/pattern/composition.test.py +++ b/tests/pattern/composition.test.py @@ -9,7 +9,7 @@ from edify.errors.input import MustBeInstanceError def test_pattern_builds_the_same_element_tree_as_a_builder(): pattern = Pattern().between(3, 20).word() builder = RegexBuilder().between(3, 20).word() - assert pattern._state == builder._state + assert pattern == builder def test_pattern_exposes_to_regex_string_terminal(): -- cgit v1.2.3