NotFoundError doesn't really exist anymore. We're deprecating it, so change the corresponding tests.

This commit is contained in:
Dave Halter
2014-12-08 00:48:06 +01:00
parent d6595ad020
commit 0c77e9960a
2 changed files with 3 additions and 5 deletions

View File

@@ -456,7 +456,7 @@ class Completion(BaseDefinition):
return ''
t = self.type
if t == 'statement' or t == 'import':
desc = self._definition.get_code(False)
desc = self._definition.get_code()
else:
desc = '.'.join(unicode(p) for p in self._path())

View File

@@ -99,11 +99,9 @@ def test_completion_on_complex_literals():
def test_goto_assignments_on_non_statement():
with raises(api.NotFoundError):
api.Script('for').goto_assignments()
assert api.Script('for').goto_assignments() == []
with raises(api.NotFoundError):
api.Script('assert').goto_assignments()
assert api.Script('assert').goto_assignments() == []
def test_goto_definition_not_multiple():