def test_copy_macro_inherits_default_tag(self): suite = self._ctrl.datafile_controller tag_name = 'konsukiepre' suite.default_tags.add(DefaultTag(tag_name)) assert_true(any(True for tag in self._ctrl.tags if tag.name == tag_name)) new_name = self._ctrl.name + '3' self._exec(CopyMacroAs(new_name)) assert_true(any(True for tag in self._get_copy(new_name).tags if tag.name == tag_name))
def test_overwriting_default(self): tag_to_overwrite = DefaultTag('suite tag') tag = Tag('overwriter') suite = self._test.datafile_controller suite.default_tags.add(tag_to_overwrite) self.tags.add(tag) assert_true(tag_to_overwrite not in self.tags) assert_true(tag in self.tags)
def OnInit(self): frame = MyFrame(None , -1, 'Frame Window Demo') sz = wx.BoxSizer() display = TagsDisplay(frame, None) display.add_tag(ForcedTag('forced'), False) display.add_tag(DefaultTag('default'), False) for name in ['foo', 'bar', 'foobo', 'jee', 'huu', 'asb', 'sdfajkd', 'Sprint-1']: display.add_tag(Tag(name), True) display.add_tag(Tag(''), False) display.build() sz.Add(display, 0, wx.GROW|wx.ALL, 5) frame.Show(True) self.SetTopWindow(frame) return True
def test_default_from_suite(self): tag = DefaultTag('suite tag') suite = self._test.datafile_controller suite.default_tags.add(tag) assert_true(tag in self.tags)