1. Jason Pellerin
  2. nose2

Source

nose2 / nose2 / tests / test_collect_plugin.py

Diff from to

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