Ejemplo n.º 1
0
 def test_create_demo_with_specific_info(self):
     with tempfile.TemporaryDirectory() as temp_dir:
         infos = [{
             "version": 1,
             "name": "Pretty Demo",
             "root": temp_dir,
         }, {
             "version": 1,
             "name": "Delicious Demo",
             "root": temp_dir,
         }]
         demo = main_module._create_demo(infos)
     children = demo.model.get_children()
     self.assertEqual(len(children), 2)
     child1, child2 = children
     self.assertEqual(child1.nice_name, "Pretty Demo")
     self.assertEqual(child2.nice_name, "Delicious Demo")
Ejemplo n.º 2
0
 def test_create_demo_default_entry_points(self):
     # This does not require GUI and it should not fail.
     # This will load the entry points contributed by the dependencies
     # of etsdemo.
     main_module._create_demo()
Ejemplo n.º 3
0
 def test_create_demo_with_title(self):
     demo = main_module._create_demo([], "Nice Title")
     self.assertEqual(demo.title, "Nice Title")