开发者

How can i distinguish the XML results of two python tests (using nosetests as test runner) with the same name but with different context

I have a test footest.py which runs with mysql database, and the same test runs on psql database, is there a way to disti开发者_运维技巧nguish this difference in an XML result file between the two tests.


Why not trying to create a base_test_class.py with a base test class class BaseSQLTest(unittest.TestCase) that contains all your tests, and 2 other files mysqltest.py and psqltest.py that contains 2 inherited classes (class MySQLTest(BaseSQLTest) and class PSQLTest(BaseSQLTest)) for your MySQL and PSQL tests.

Doing this will split your tests in the resulting XML.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜