Skip to content

Commit

Permalink
Reorder tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotwrobson committed Jun 11, 2024
1 parent 2dabc18 commit 903d312
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_dfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,6 @@ def test_equivalence_partials(self) -> None:
self.assertEqual(self.partial_dfa, complete_dfa)
self.assertEqual(self.partial_dfa, complete_dfa.to_partial(minify=False))

# Checking for equivalent number of states
self.assertEqual(complete_dfa.states, complete_dfa.to_complete().states)

# Make a fake partial DFA and check that the number of states is
# still reduced
test_dfa = DFA(
Expand All @@ -323,6 +320,11 @@ def test_equivalence_partials(self) -> None:
final_states=complete_dfa.final_states,
allow_partial=True,
)

# Checking for equivalent number of states
self.assertEqual(complete_dfa.states, complete_dfa.to_complete().states)
self.assertEqual(len(self.partial_dfa.states), len(test_dfa.to_partial().states))

self.assertTrue(
test_dfa.to_partial(minify=False).states.issubset(complete_dfa.states)
)
Expand Down

0 comments on commit 903d312

Please sign in to comment.