diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-11-06 09:50:44 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-11-06 09:55:33 +0100 |
| commit | 08f50826ec76442d2a010bb23fda0ce66efad99d (patch) | |
| tree | 69c7d00d41f51e068dae8d3b259816437e6614c9 /test.py | |
| parent | 53be8ed80cf8b92e011b34ea8bf2e602adb8621e (diff) | |
| download | geldschieberbot-minimize.tar.gz geldschieberbot-minimize.zip | |
export the minimize command from the geldschieberbotminimize
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() |
