diff options
author | Thomas Jourdan <b.vehikel@googlemail.com> | 2010-01-09 21:24:55 (GMT) |
---|---|---|
committer | Thomas Jourdan <b.vehikel@googlemail.com> | 2010-01-09 21:24:55 (GMT) |
commit | 8d8009ea73b77fc37c165462b21a342fb3614416 (patch) | |
tree | d11735b60966666f7f180874f4ca6a167fc585e1 /test_suite.py | |
parent | 9840852aca167c25c979fa08a23bc0fc623b680e (diff) |
Themes and categories for stamps.
Diffstat (limited to 'test_suite.py')
-rw-r--r-- | test_suite.py | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/test_suite.py b/test_suite.py index acd0905..a33c587 100644 --- a/test_suite.py +++ b/test_suite.py @@ -126,9 +126,6 @@ class TestKandidModel(unittest.TestCase): def test_sampler(self): self._run_ep_breed_test('sampler') - def test_stamp(self): - self._run_ep_breed_test('stamp') - def _run_ep_breed_test(self, key): model_random.set_flurry(9) for flavor in ka_extensionpoint.list_extensions(key): @@ -148,6 +145,33 @@ class TestKandidModel(unittest.TestCase): print mm1, mm2, mm3 self.assertTrue(diff) + def test_stamp(self): + cpool = model_constraintpool.ConstraintPool.get_pool() + for theme in ka_importer.get_theme_list(): + cpool.set('*/themeconstraint', + 'themeconstraint', theme) + self._run_stamp_breed_test(2) + cpool.set('*/themeconstraint', + 'hemeconstraint', 'non_existing_theme') + self._run_stamp_breed_test(99) + cpool.set('*/themeconstraint', + 'themeconstraint', ka_importer.get_theme_list()) + self._run_stamp_breed_test(0) + + def _run_stamp_breed_test(self, max_states): + model_random.set_flurry(9) + for flavor in ka_extensionpoint.list_extensions('stamp'): + mm1 = ka_extensionpoint.create(flavor, '/', max_states) + mm1.randomize() + mm1.mutate() + mm1.swap_places() + mm2 = ka_extensionpoint.create(flavor, '/', max_states) + mm2.randomize() + mm2.mutate() + mm2.swap_places() + mm3 = mm1.crossingover(mm2) + mm3.mutate() + def test_protozon_formater(self): model_random.set_flurry(9) cpool = model_constraintpool.ConstraintPool.get_pool() @@ -630,6 +654,9 @@ Collaboration Tasks Unfinished tasks: 5 + +Activity + Running: Kandid, release v3, DoB activated ''' self.assertEqual(expected, status.recall()) self.assertFalse(status.isDirty()) |