mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Compute the name of the test file so that it can be found both when this
test is run as a script and when imported via the regression test framework. Problem reported by Phillip Porch <root@theporch.com>.
This commit is contained in:
parent
25e7cee1c8
commit
17647f5201
1 changed files with 13 additions and 3 deletions
|
|
@ -1,7 +1,17 @@
|
|||
from xml.dom.minidom import parse, Node, Document, parseString
|
||||
import traceback, sys
|
||||
# test for xml.dom.minidom
|
||||
|
||||
tstfile="test.xml"
|
||||
from xml.dom.minidom import parse, Node, Document, parseString
|
||||
|
||||
import os.path
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
if __name__ == "__main__":
|
||||
base = sys.argv[0]
|
||||
else:
|
||||
base = __file__
|
||||
tstfile = os.path.join(os.path.dirname(base), "test.xml")
|
||||
del base
|
||||
|
||||
Node._debug=1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue