private static void AssertHasExpression(string content, bool expectExpression, int index = -1, PythonLanguageVersion version = PythonLanguageVersion.V35) { var buffer = new MockTextBuffer(content); if (index < 0) { index += content.Length + 1; } var pt = new SnapshotPoint(buffer.CurrentSnapshot, index); var actual = PythonTextBufferInfo.IsPossibleExpressionAtPoint(pt, version); if (expectExpression) { Assert.IsTrue(actual, content); } else { Assert.IsFalse(actual, content); } }