public void CanIdentifyVariableTypeAndGetCompletionData() { var str = "a = 5.0\na."; var completionProvider = new IronPythonCompletionProvider(); var completionData = completionProvider.GetCompletionData(str); Assert.AreNotEqual(0, completionData.Length); }
public void CanImportSystemLibraryAndGetCompletionData() { var str = "\nimport System\nSystem."; var completionProvider = new IronPythonCompletionProvider(); var completionData = completionProvider.GetCompletionData(str); Assert.AreEqual(224, completionData.Length); Assert.AreEqual(1, completionProvider.ImportedTypes.Count); Assert.IsTrue(completionProvider.ImportedTypes.ContainsKey("System")); }
public void CanGetCompletionDataForArrayListVariable() { var str = "from System.Collections import ArrayList\na = ArrayList()\na."; var completionProvider = new IronPythonCompletionProvider(); var matches = completionProvider.GetCompletionData(str); Assert.AreNotEqual(0, matches.Length); //Assert.AreEqual(typeof(IronPython.Runtime.PythonDictionary), matches["a"].Item3); }
public void CanImportSystemCollectionsLibraryAndGetCompletionData() { var str = "\nimport System.Collections\nSystem.Collections."; var completionProvider = new IronPythonCompletionProvider(); var completionData = completionProvider.GetCompletionData(str); Assert.AreEqual(29, completionData.Length); }