public string GetProperty(string name) { if (IsWorkspace) { return(_pythonWorkspace.GetStringProperty(name)); } return(_pythonProject.GetProperty(name)); }
private static TestFrameworkType GetTestFramework(PythonProject pyProj) { var testFrameworkType = TestFrameworkType.None; try { string testFrameworkStr = pyProj.GetProperty(PythonConstants.TestFrameworkSetting); if (Enum.TryParse <TestFrameworkType>(testFrameworkStr, ignoreCase: true, out TestFrameworkType parsedFramework)) { testFrameworkType = parsedFramework; } } catch (Exception ex) when(!ex.IsCriticalException()) { Trace.WriteLine("Exception : " + ex.Message); } return(testFrameworkType); }
public void MainFileIsMain2PyFile() { PropertyStorageLocations location; Assert.AreEqual(@"src\Main2.py", targetProject.GetProperty(null, null, "MainFile", out location)); }