Clear contents of global hgrc for tests before running each test.
authorThomas Arendsen Hein <thomas@intevation.de>
Tue, 22 Aug 2006 09:55:14 +0200
changeset 2989 3091b1153e2c
parent 2967 eef469259745
child 2990 61fcd9fac434
Clear contents of global hgrc for tests before running each test. This fixes running test-mq-qdiff after test-mq, because of changed settings.
tests/run-tests.py
--- a/tests/run-tests.py	Sun Aug 20 23:52:52 2006 -0500
+++ b/tests/run-tests.py	Tue Aug 22 09:55:14 2006 +0200
@@ -211,6 +211,10 @@
         sys.stdout.write('.')
         sys.stdout.flush()
 
+    # create a fresh hgrc
+    hgrc = file(HGRCPATH, 'w+')
+    hgrc.close()
+
     err = os.path.join(TESTDIR, test+".err")
     ref = os.path.join(TESTDIR, test+".out")
 
@@ -319,11 +323,11 @@
 os.environ["HGEDITOR"] = sys.executable + ' -c "import sys; sys.exit(0)"'
 os.environ["HGMERGE"]  = sys.executable + ' -c "import sys; sys.exit(0)"'
 os.environ["HGUSER"]   = "test"
-os.environ["HGRCPATH"] = ""
 
 TESTDIR = os.environ["TESTDIR"] = os.getcwd()
 HGTMP   = os.environ["HGTMP"]   = tempfile.mkdtemp("", "hgtests.")
 DAEMON_PIDS = os.environ["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids')
+HGRCPATH = os.environ["HGRCPATH"] = os.path.join(HGTMP, '.hgrc')
 
 vlog("# Using TESTDIR", TESTDIR)
 vlog("# Using HGTMP", HGTMP)