1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00

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.
This commit is contained in:
david
2012-08-02 18:35:36 +00:00
parent 3f415ef38a
commit 77fbcc8bc5
2 changed files with 10 additions and 3 deletions

View File

@@ -1 +0,0 @@
ndiff

View File

@@ -3,12 +3,20 @@
# Unit tests for Ndiff. # Unit tests for Ndiff.
import subprocess import subprocess
import sys
import unittest import unittest
import xml.dom.minidom import xml.dom.minidom
import StringIO import StringIO
# The ndiff.py symlink exists so we can do this. import imp
from ndiff import * 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): class scan_test(unittest.TestCase):
"""Test the Scan class.""" """Test the Scan class."""