/unit_tests/test_id_plugin.py
Python | 20 lines | 16 code | 4 blank | 0 comment | 1 complexity | caf34affe9d0326ffb242a9942f124cd MD5 | raw file
1import unittest 2from nose.config import Config 3from nose.plugins.builtin import TestId 4import mock 5 6class TestTestIdPlugin(unittest.TestCase): 7 8 def test_default_id_file_is_in_working_dir(self): 9 tid = TestId() 10 c = Config() 11 opt = mock.Bucket() 12 opt.testIdFile = '.noseids' 13 tid.configure(opt, c) 14 print tid.idfile 15 assert tid.idfile.startswith(c.workingDir), \ 16 "%s is not under %s" % (tid.idfile, c.workingDir) 17 18 19if __name__ == '__main__': 20 unittest.main()