/usr/lib/python2.7/dist-packages/nose2/tests/unit/test_session.py is in python-nose2 0.5.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from nose2 import events, session
from nose2.compat import unittest
class SessionUnitTests(unittest.TestCase):
def test_can_create_session(self):
session.Session()
def test_load_plugins_from_module_can_load_plugins(self):
class fakemod:
pass
f = fakemod()
class A(events.Plugin):
pass
f.A = A
s = session.Session()
s.loadPluginsFromModule(f)
assert s.plugins
a = s.plugins[0]
self.assertEqual(a.session, s)
|