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.
精彩评论