/unit_tests/test_id_plugin.py

https://bitbucket.org/jpellerin/nose/ · Python · 20 lines · 16 code · 4 blank · 0 comment · 1 complexity · caf34affe9d0326ffb242a9942f124cd MD5 · raw file

  1. import unittest
  2. from nose.config import Config
  3. from nose.plugins.builtin import TestId
  4. import mock
  5. class TestTestIdPlugin(unittest.TestCase):
  6. def test_default_id_file_is_in_working_dir(self):
  7. tid = TestId()
  8. c = Config()
  9. opt = mock.Bucket()
  10. opt.testIdFile = '.noseids'
  11. tid.configure(opt, c)
  12. print tid.idfile
  13. assert tid.idfile.startswith(c.workingDir), \
  14. "%s is not under %s" % (tid.idfile, c.workingDir)
  15. if __name__ == '__main__':
  16. unittest.main()