def test_is_selected_selects_method_unbound(self): to = build_tst_object('class', module='noseselecttests.tests', cls='NoseSelectPluginTest', func= 'test_configure_complex') plugin = NoseSelectPlugin() plugin.add_criterion('NoseSelectPluginTest.test_configure_complex') self.assertTrue(plugin._is_selected(to.test_configure_complex))
def test_is_selected_negative(self): to = build_tst_object('func', module='noseselecttests.tests', cls='NoseSelectPluginTest', func= 'test_configure_complex') plugin = NoseSelectPlugin() plugin.add_criterion('foobar') self.assertFalse(plugin._is_selected(to))
def test_is_selected_wildcard(self): to = build_tst_object('func', module='noseselecttests.tests', cls='NoseSelectPluginTest', func= 'test_configure_complex') plugin = NoseSelectPlugin() plugin.add_criterion('configure*complex') self.assertTrue(plugin._is_selected(to))
def test_is_selected_case_insensitive(self): to = build_tst_object('func', module='noseselecttests.tests', cls='NoseSelectPluginTest', func= 'test_configure_complex') plugin = NoseSelectPlugin() plugin.add_criterion('ConfigurE_CompLex') self.assertTrue(plugin._is_selected(to))
def test_is_selected_selects_module(self): plugin = NoseSelectPlugin() plugin.add_criterion('noseselecttests.tests') self.assertTrue(plugin._is_selected(DummyTest))
def test_is_selected_false(self): plugin = NoseSelectPlugin() plugin.add_criterion('foobar') self.assertFalse(plugin._is_selected(fobj))
def test_is_selected_wildcard(self): plugin = NoseSelectPlugin() plugin.add_criterion('configure*complex') self.assertTrue(plugin._is_selected(configure_complex))
def test_is_selected_case_insensitive(self): plugin = NoseSelectPlugin() plugin.add_criterion('fObJ') self.assertTrue(plugin._is_selected(fobj))
def test_is_selected_function(self): plugin = NoseSelectPlugin() plugin.add_criterion('fobj') self.assertTrue(plugin._is_selected(fobj))
def test_is_selected_selects_method_bound(self): plugin = NoseSelectPlugin() plugin.add_criterion('DummyTest.test_foo') self.assertTrue(plugin._is_selected(DummyTest().test_foo))
def test_is_selected_selects_class(self): plugin = NoseSelectPlugin() plugin.add_criterion('DummyTest') self.assertTrue(plugin._is_selected(DummyTest))