From 36425f55a6d8aa028e8def1920679aa0c21ed29e Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 22 May 2014 02:25:47 +0000 Subject: [PATCH] Fix make ndiff_check spurious failure The code involving imp is equivalent to "from ndiff import *", and ndiff imports StringIO.StringIO as StringIO, which meant that while ndifftest intended the name to be the module, it was really the class. Just moved the import later to be sure the name was the one we intend. --- ndiff/ndifftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ndiff/ndifftest.py b/ndiff/ndifftest.py index 82c184ebb..2fa4ae01f 100755 --- a/ndiff/ndifftest.py +++ b/ndiff/ndifftest.py @@ -11,7 +11,6 @@ import xml xml.__path__ = [x for x in xml.__path__ if "_xmlplus" not in x] import xml.dom.minidom -import StringIO import imp dont_write_bytecode = sys.dont_write_bytecode @@ -23,6 +22,8 @@ for x in dir(ndiff): sys.dont_write_bytecode = dont_write_bytecode del dont_write_bytecode +import StringIO + class scan_test(unittest.TestCase): """Test the Scan class."""