902 assert '=' in key, ('extra config opt %s must ' |
902 assert '=' in key, ('extra config opt %s must ' |
903 'have an = for assignment' % opt) |
903 'have an = for assignment' % opt) |
904 hgrc.write('[%s]\n%s\n' % (section, key)) |
904 hgrc.write('[%s]\n%s\n' % (section, key)) |
905 hgrc.close() |
905 hgrc.close() |
906 |
906 |
907 ref = os.path.join(TESTDIR, test+".out") |
|
908 err = os.path.join(TESTDIR, test+".err") |
907 err = os.path.join(TESTDIR, test+".err") |
909 if os.path.exists(err): |
908 if os.path.exists(err): |
910 os.remove(err) # Remove any previous output files |
909 os.remove(err) # Remove any previous output files |
911 lctest = test.lower() |
910 lctest = test.lower() |
912 |
911 |
913 if lctest.endswith('.py'): |
912 for ext, func, out in testtypes: |
914 runner = pytest |
913 if lctest.endswith(ext): |
915 elif lctest.endswith('.t'): |
914 runner = func |
916 runner = tsttest |
915 ref = os.path.join(TESTDIR, test + out) |
917 ref = testpath |
916 break |
918 else: |
917 else: |
919 return skip("unknown test type") |
918 return skip("unknown test type") |
920 |
919 |
921 # Make a tmp subdirectory to work in |
920 # Make a tmp subdirectory to work in |
922 testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \ |
921 testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \ |