mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 06:01:28 +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:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user