mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49: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:
parent
3f415ef38a
commit
77fbcc8bc5
2 changed files with 10 additions and 3 deletions
|
|
@ -1 +0,0 @@
|
|||
ndiff
|
||||
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue