From f1287e6e9af7397cfd6aa5dc6d49eec7fe916c95 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 2 Jun 2019 19:12:43 +0100 Subject: [PATCH] tests: Py3.x fix. --- tests/module_finder_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/module_finder_test.py b/tests/module_finder_test.py index 11062512..e61c768f 100644 --- a/tests/module_finder_test.py +++ b/tests/module_finder_test.py @@ -122,7 +122,7 @@ class SysModulesMethodTest(testlib.TestCase): # linecache adds a line ending to the final line if one is missing. actual_src = open(path, 'rb').read() - if actual_src[-1] != b('\n'): + if actual_src[-1:] != b('\n'): actual_src += b('\n') self.assertEquals(src, actual_src)