From 77fbcc8bc5418c448b18b94ca6f22370e4b9de9a Mon Sep 17 00:00:00 2001 From: david Date: Thu, 2 Aug 2012 18:35:36 +0000 Subject: [PATCH] Get rid of ndiff.py symlink. This existed only to allow importing the ndiff program as a module for the ndifftest.py program. I found another way to do that. --- ndiff/ndiff.py | 1 - ndiff/ndifftest.py | 12 ++++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) delete mode 120000 ndiff/ndiff.py diff --git a/ndiff/ndiff.py b/ndiff/ndiff.py deleted file mode 120000 index f983dc228..000000000 --- a/ndiff/ndiff.py +++ /dev/null @@ -1 +0,0 @@ -ndiff \ No newline at end of file diff --git a/ndiff/ndifftest.py b/ndiff/ndifftest.py index 6294f0dc2..7f6eb761c 100755 --- a/ndiff/ndifftest.py +++ b/ndiff/ndifftest.py @@ -3,12 +3,20 @@ # Unit tests for Ndiff. import subprocess +import sys import unittest import xml.dom.minidom import StringIO -# The ndiff.py symlink exists so we can do this. -from ndiff import * +import imp +dont_write_bytecode = sys.dont_write_bytecode +sys.dont_write_bytecode = True +ndiff = imp.load_source("ndiff", "ndiff") +for x in dir(ndiff): + if not x.startswith("_"): + globals()[x] = getattr(ndiff, x) +sys.dont_write_bytecode = dont_write_bytecode +del dont_write_bytecode class scan_test(unittest.TestCase): """Test the Scan class."""