Extract the proper directory to combine with the relative path of the urlist diff master, instead of using getcwd() .

- Legacy-Id: 6618
This commit is contained in:
Henrik Levkowetz 2013-11-02 20:23:47 +00:00
parent 43c1b096dd
commit 84eee2e83c

View file

@ -207,8 +207,8 @@ class SimpleUrlTestCase(django.test.TestCase,RealDatabaseTest):
if "skipdiff" in codes:
return
if master:
cwd = os.getcwd()
master = os.path.join(cwd, master)
root_dir = os.path.dirname(os.path.dirname(os.path.abspath(sys.modules["__main__"].__file__)))
master = os.path.join(root_dir, master)
mfile = open(master)
refhtml = mfile.read()
mfile.close()