コード例 #1
0
ファイル: ProjectInfo.cs プロジェクト: zyxws012/PTVS
 public string GetProperty(string name)
 {
     if (IsWorkspace)
     {
         return(_pythonWorkspace.GetStringProperty(name));
     }
     return(_pythonProject.GetProperty(name));
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        public void MainFileIsMain2PyFile()
        {
            PropertyStorageLocations location;

            Assert.AreEqual(@"src\Main2.py", targetProject.GetProperty(null, null, "MainFile", out location));
        }