summaryrefslogtreecommitdiff
path: root/unit_tests/test_id_plugin.py
blob: 8ac38c71a93cc94bdf39d9e5327651e11e3c3acc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import unittest2 as unittest
from nose.config import Config
from nose.plugins.builtin import TestId
import mock

class TestTestIdPlugin(unittest.TestCase):

    def test_default_id_file_is_in_working_dir(self):
        tid = TestId()
        c = Config()
        opt = mock.Bucket()
        opt.testIdFile = '.noseids'
        tid.configure(opt, c)
        print tid.idfile
        assert tid.idfile.startswith(c.workingDir), \
               "%s is not under %s" % (tid.idfile, c.workingDir)


if __name__ == '__main__':
    unittest.main()