Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add test for #347 (safe eval syntax error)
  • Loading branch information
mlauter committed Aug 13, 2014
commit 0c773ff340fd3dfe466c85b7b7257d8c5ab34b6d
6 changes: 6 additions & 0 deletions bpython/test/test_autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ def test_cw(self):
self.assertEqual(self.repl.cw(), 'datetime')
"""

class TestSafeEval(unittest.TestCase):
def test_catches_syntax_error(self):
try:
autocomplete.safe_eval('1re',{})
except:
self.fail('safe_eval raises an error')

# make some fake files? Dependency inject? mock?
class TestFilenameCompletion(unittest.TestCase):
Expand Down