mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
even tests should not suffer too much from side effects.
This commit is contained in:
@@ -51,12 +51,13 @@ class TestSetupReadline(unittest.TestCase):
|
|||||||
self.namespace.sys = sys
|
self.namespace.sys = sys
|
||||||
self.namespace.os = os
|
self.namespace.os = os
|
||||||
|
|
||||||
|
try:
|
||||||
assert self.completions('os.path.join') == ['os.path.join']
|
assert self.completions('os.path.join') == ['os.path.join']
|
||||||
assert self.completions('os.path.join().upper') == ['os.path.join().upper']
|
assert self.completions('os.path.join().upper') == ['os.path.join().upper']
|
||||||
|
|
||||||
c = set(['os.' + d for d in dir(os) if d.startswith('ch')])
|
c = set(['os.' + d for d in dir(os) if d.startswith('ch')])
|
||||||
assert set(self.completions('os.ch')) == set(c)
|
assert set(self.completions('os.ch')) == set(c)
|
||||||
|
finally:
|
||||||
del self.namespace.sys
|
del self.namespace.sys
|
||||||
del self.namespace.os
|
del self.namespace.os
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user