Cloud9IDE和为Django项目运行单元测试

Cloud9IDE和为Django项目运行单元测试,django,unit-testing,cloud9-ide,Django,Unit Testing,Cloud9 Ide,有谁能告诉我在使用Cloud9 IDE时如何在Python/Django项目上运行单元测试吗?目前Cloud9支持Python2.6.6,因此您没有可用的单元测试框架 unittest2是Python2.4+的后台端口,您可以在Cloud9中使用它。见 只需从终端类型“easy_install unittest2”中选择 确保在编写测试时使用unittest2模块 import unittest2 class MyTest(unittest2.TestCase): #tests in her

有谁能告诉我在使用Cloud9 IDE时如何在Python/Django项目上运行单元测试吗?

目前Cloud9支持Python2.6.6,因此您没有可用的单元测试框架

unittest2是Python2.4+的后台端口,您可以在Cloud9中使用它。见

只需从终端类型“easy_install unittest2”中选择

确保在编写测试时使用unittest2模块

import unittest2

class MyTest(unittest2.TestCase):

#tests in here

if __name__ == '__main__':
    unittest2.main()
希望有帮助