From 4d3f6fa7909b1880986204ae2c2007aa506ab1c2 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Mon, 2 Dec 2019 00:04:22 +0100 Subject: [PATCH] Fix Python 2 issues --- test/test_inference/test_compiled.py | 3 +-- test/test_utils.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/test_inference/test_compiled.py b/test/test_inference/test_compiled.py index 2a2c4304..e6e6991b 100644 --- a/test/test_inference/test_compiled.py +++ b/test/test_inference/test_compiled.py @@ -173,12 +173,11 @@ def test_qualified_names(same_process_inference_state, obj, expected_names): def test_operation(Script, inference_state, create_compiled_object): - #b = create_simple_object(inference_state, 'bool')._compiled_obj b = create_compiled_object(bool) true, = _infer_comparison_part( inference_state, b.parent_context, left=list(b.execute_with_values())[0], - operator='is not', + operator=u'is not', right=b, ) assert true.py__name__() == 'bool' diff --git a/test/test_utils.py b/test/test_utils.py index 17328a36..7bb86bbf 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -80,7 +80,7 @@ class TestSetupReadline(unittest.TestCase): difference = {x for x in difference if not x.startswith('from os import _')} # There are quite a few differences, because both Windows and Linux # (posix and nt) libraries are included. - assert len(difference) < 38 + assert len(difference) < 10 @cwd_at('test') def test_local_import(self):