Error when using unittest module in PythonScript


#1

I wanted to test some functions, so I wrote following “empty” test.

But I could not run because of error.

Are there any ways to test for script efficiently?

import unittest

class MyClassTestCase(unittest.TestCase):
    def setUp(self):
        pass
    def tearDown(self):
        pass

    def testFooMethod(self):
        pass

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

Message: No module named __main__

Traceback:
  line 75, in __init__, "C:\Program Files\Rhinoceros 5.0 (64-bit)\Plug-ins\IronPython\Lib\unittest\main.py"

Using unittest in Rhino python not possible?