Skip to content

Commit

Permalink
Update test_pdaconfiguration.py
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotwrobson committed Oct 21, 2023
1 parent 9f4d9ee commit 44331d2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_pdaconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,14 @@ def test_config_repr(self) -> None:
repr(config),
"PDAConfiguration('q0', 'ab', PDAStack(('a', 'b')))", # noqa
)

def test_config_equality(self) -> None:
"""Should only be equal for equal configurations."""
config = PDAConfiguration("q0", "ab", PDAStack(["a", "b"]))

self.assertEqual(config, config)
self.assertEqual(config, PDAConfiguration("q0", "ab", PDAStack(["a", "b"])))

self.assertNotEqual(config, "")
self.assertNotEqual(config, PDAConfiguration("q1", "ab", PDAStack(["a", "b"])))
self.assertNotEqual(config, PDAConfiguration("q0", "ab", PDAStack(["b", "b"])))

0 comments on commit 44331d2

Please sign in to comment.