public void CreatePytestId_ClassFuncWithRelativeFilename() { Assert.AreEqual( ".\\package1\\packageA\\test1.py::Test_test1::test_A", JunitXmlTestResultParser.CreatePytestId("package1\\packageA\\test1.py", "package1.packageA.test1.Test_test1", "test_A") ); }
public void CreatePytestId_GlobalFunc() { Assert.AreEqual( ".\\test_sample.py::test_answer", JunitXmlTestResultParser.CreatePytestId("test_sample.py", "test_sample", "test_answer") ); }
public void CreatePytestId_GlobalFuncRelative() { Assert.AreEqual( ".\\tests\\unit\\test_statistics.py::test_key_creation", JunitXmlTestResultParser.CreatePytestId("tests\\unit\\test_statistics.py", "tests.unit.test_statistics", "test_key_creation") ); }
public void CreatePytestId_FuncInsideClass() { Assert.AreEqual( ".\\test2.py::Test_test2::test_A", JunitXmlTestResultParser.CreatePytestId("test2.py", "test2.Test_test2", "test_A") ); }
public void CreatePytestIdMatchesDiscoveryPytestId() { var projectRoot = "c:\\home\\"; var filename = "Package1\\packageA\\Test1.py"; var pytestId = ".\\package1\\packageA\\test1.py::Test_test1::test_A"; //Note: ignoring case since vsTestResult lookup ignores Assert.AreEqual( string.Compare( PyTestExtensions.CreateProperCasedPytestId(projectRoot + filename, projectRoot, pytestId), JunitXmlTestResultParser.CreatePytestId(filename.ToLower(), "package1.packageA.test1.Test_test1", "test_A"), ignoreCase: true), 0 ); }