Does the library use unit test for python (especially 3.x, I really don't like 2.x), does the decorator have root access only?
I have this testing feature.
def test_blabla_as_root(): self.assertEqual(blabla(), 1)
The blabla function can only be performed by root. I want the root user only for clearance, so a regular user will skip this test:
@support.root_only def test_blabla_as_root(): self.assertEqual(blabla(), 1)
Is there such a decorator? We have @ support.cpython_only decorator, though.
python
vajrasky
source share