Fix a few more tests that where not correctly written a while ago.

This commit is contained in:
Dave Halter
2016-07-01 08:42:05 +02:00
parent d5098ef096
commit 056ad1b8a8
2 changed files with 4 additions and 3 deletions

View File

@@ -87,7 +87,7 @@ class TestInterpreterAPI(TestCase):
def test_complete_raw_module(self):
import os
self.check_interpreter_complete('os.path.join().up',
self.check_interpreter_complete('os.path.join("a").up',
locals(),
['upper'])

View File

@@ -34,7 +34,7 @@ class TestSetupReadline(unittest.TestCase):
def test_simple(self):
assert self.completions('list') == ['list']
assert self.completions('importerror') == ['ImportError']
s = "print BaseE"
s = "print(BaseE"
assert self.completions(s) == [s + 'xception']
def test_nested(self):
@@ -53,7 +53,8 @@ class TestSetupReadline(unittest.TestCase):
try:
assert self.completions('os.path.join') == ['os.path.join']
assert self.completions('os.path.join().upper') == ['os.path.join().upper']
string = 'os.path.join("a").upper'
assert self.completions(string) == [string]
c = set(['os.' + d for d in dir(os) if d.startswith('ch')])
assert set(self.completions('os.ch')) == set(c)