diff options
Diffstat (limited to 'test.py')
| -rwxr-xr-x | test.py | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -1437,5 +1437,33 @@ class TestStateLoadStore(unittest.TestCase): self.assertTrue(compare_state(sp, state=bot.state)) +class TestMinimize(unittest.TestCase): + """Test the minimize command""" + + def setUp(self): + reset_state("test/state_minimize.json") + + def test_minimize(self): + res = run_bot(self, num[alice], "!minimize") + # The found cycle is not deterministic yet + # exp = "minimize:\nbob -> charlie -> alice 10" + # self.assertEqual( res.stdout, exp ) + self.assertTrue("alice" in res.stdout) + self.assertTrue("bob" in res.stdout) + self.assertTrue("charlie" in res.stdout) + self.assertTrue("10" in res.stdout) + + res = run_bot(self, num[alice], "!full-sum") + o =\ +"""Summary: +alice: +\tAll fine :) +bob: +\tAll fine :) +charlie: +\tAll fine :)""" + self.assertEqual(res.stdout, o) + + if __name__ == '__main__': unittest.main() |
