From 74de9e7d53ab681ac052b747cd97572106508c2c Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Mon, 2 Dec 2019 00:22:15 +0100 Subject: [PATCH] Make sure that the differences are calculated a bit more reliable, fixes #1429 --- test/test_utils.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/test_utils.py b/test/test_utils.py index 17328a36..e9204515 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -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):