diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-09-22 02:06:38 -0500 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-09-22 02:06:38 -0500 |
commit | f52f6148d775e51a9cb68201effef905c0880c75 (patch) | |
tree | 9ef8269b5c444e44420a6346cf77b981b3d464e5 | |
parent | 5aa423ee6294cfba1f4b98d1a8720da909346436 (diff) |
combine some tests together
-rw-r--r-- | tests/test_vba.py | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/tests/test_vba.py b/tests/test_vba.py index fcd5c61..3a2de72 100644 --- a/tests/test_vba.py +++ b/tests/test_vba.py @@ -47,6 +47,14 @@ def bootstrap(): return state +class OtherVbaTests(unittest.TestCase): + def test_keyboard_planner(self): + button_sequence = keyboard.plan_typing("an") + expected_result = ["select", "a", "d", "r", "r", "r", "r", "a"] + + self.assertEqual(len(expected_result), len(button_sequence)) + self.assertEqual(expected_result, button_sequence) + class VbaTests(unittest.TestCase): # unittest in jython2.5 doesn't seem to have setUpClass ?? Man, why am I on # jython2.5? This is ancient. @@ -115,14 +123,6 @@ class VbaTests(unittest.TestCase): player_action = self.get_wram_value("PlayerAction") self.assertEqual(player_action, 1) # 1 = standing -class TestEmulator(unittest.TestCase): - @classmethod - def setUpClass(cls): - cls.cry = vba.crystal() - - # advance it forward past the intro sequences - cls.cry.vba.step(count=3500) - def test_PlaceString(self): self.cry.call(0, 0x1078) @@ -138,12 +138,5 @@ class TestEmulator(unittest.TestCase): self.assertTrue("TRAINER" in text) - def test_keyboard_planner(self): - button_sequence = keyboard.plan_typing("an") - expected_result = ["select", "a", "d", "r", "r", "r", "r", "a"] - - self.assertEqual(len(expected_result), len(button_sequence)) - self.assertEqual(expected_result, button_sequence) - if __name__ == "__main__": unittest.main() |