Make sure that the differences are calculated a bit more reliable, fixes #1429

This commit is contained in:
Dave Halter
2019-12-02 00:22:15 +01:00
parent f54291a30b
commit 74de9e7d53

View File

@@ -77,10 +77,14 @@ class TestSetupReadline(unittest.TestCase):
# There are minor differences, e.g. the dir doesn't include deleted
# items as well as items that are not only available on linux.
difference = set(self.completions(s)).symmetric_difference(goal)
difference = {x for x in difference if not x.startswith('from os import _')}
difference = {
x for x in difference
if all(not x.startswith('from os import ' + s)
for s in ['_', 'O_', 'EX_', 'MFD_', 'SF_'])
}
# There are quite a few differences, because both Windows and Linux
# (posix and nt) libraries are included.
assert len(difference) < 38
# (posix and nt) librariesare included.
assert len(difference) < 20
@cwd_at('test')
def test_local_import(self):