From cecdaa98aedd23ff378911142c868e5348d052a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 2 Jun 2020 15:21:04 +0200 Subject: [PATCH] Exclude more Linux constants in test_import The list of differences have grown again in Python 3.9. Instead of increasing the allowed count let's filter out more Linux-specific constants. This probably makes it possible to reduce allowed len(difference) too. --- test/test_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_utils.py b/test/test_utils.py index 085b9a1f..14ca802f 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -80,11 +80,13 @@ class TestSetupReadline(unittest.TestCase): difference = { x for x in difference if all(not x.startswith('from os import ' + s) - for s in ['_', 'O_', 'EX_', 'MFD_', 'SF_', 'ST_']) + for s in ['_', 'O_', 'EX_', 'MFD_', 'SF_', 'ST_', + 'CLD_', 'POSIX_SPAWN_', 'P_', 'RWF_', + 'SCHED_']) } # There are quite a few differences, because both Windows and Linux # (posix and nt) librariesare included. - assert len(difference) < 22 + assert len(difference) < 15 def test_local_import(self): s = 'import test.test_utils'