Commits

jpellerin  committed 91730e6

Added unit test for collect plugin, renamed prof plugin testcase

  • Participants
  • Parent commits bf78fa8

Comments (0)

Files changed (2)

File nose2/tests/test_collect_plugin.py

 import re
 import unittest2
 
-from ._common import FunctionalTestCase
+from ._common import FunctionalTestCase, FakeStartTestRunEvent
+from ..plugins import collect
 
 
 class CollectOnlyFunctionalTest(FunctionalTestCase):
             self.runIn('layout1', '-v', '--collect-only'),
             stderr=EXPECT_LAYOUT1)
 
+class TestCollectOnly(unittest2.TestCase):
+    tags = ['unit']
+
+    def setUp(self):
+        self.plugin = collect.CollectOnly()
+
+    def test_startTestRun_sets_executeTests(self):
+        event = FakeStartTestRunEvent()
+        self.plugin.startTestRun(event)
+        self.assertEqual(event.executeTests, self.plugin.collectTests)
 
 
 # expectations

File nose2/tests/test_prof_plugin.py

         prof.hotshot = self.hotshot
         prof.stats = self.stats
 
-    def test_start_test_run_sets_executeTests(self):
+    def test_startTestRun_sets_executeTests(self):
         _prof = Stub()
         _prof.runcall = object()
         prof.hotshot.Profile = lambda filename: _prof