mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
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.
This commit is contained in:
committed by
Dave Halter
parent
9980f760b1
commit
cecdaa98ae
@@ -80,11 +80,13 @@ class TestSetupReadline(unittest.TestCase):
|
|||||||
difference = {
|
difference = {
|
||||||
x for x in difference
|
x for x in difference
|
||||||
if all(not x.startswith('from os import ' + s)
|
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
|
# There are quite a few differences, because both Windows and Linux
|
||||||
# (posix and nt) librariesare included.
|
# (posix and nt) librariesare included.
|
||||||
assert len(difference) < 22
|
assert len(difference) < 15
|
||||||
|
|
||||||
def test_local_import(self):
|
def test_local_import(self):
|
||||||
s = 'import test.test_utils'
|
s = 'import test.test_utils'
|
||||||
|
|||||||
Reference in New Issue
Block a user