Show More
@@ -857,6 +857,12 b' class Test(unittest.TestCase):' | |||||
857 | else: |
|
857 | else: | |
858 | return re.escape(p) |
|
858 | return re.escape(p) | |
859 |
|
859 | |||
|
860 | def _localip(self): | |||
|
861 | if self._useipv6: | |||
|
862 | return b'::1' | |||
|
863 | else: | |||
|
864 | return b'127.0.0.1' | |||
|
865 | ||||
860 | def _getenv(self): |
|
866 | def _getenv(self): | |
861 | """Obtain environment variables to use during test execution.""" |
|
867 | """Obtain environment variables to use during test execution.""" | |
862 | def defineport(i): |
|
868 | def defineport(i): | |
@@ -881,6 +887,10 b' class Test(unittest.TestCase):' | |||||
881 | env["HGENCODINGMODE"] = "strict" |
|
887 | env["HGENCODINGMODE"] = "strict" | |
882 | env['HGIPV6'] = str(int(self._useipv6)) |
|
888 | env['HGIPV6'] = str(int(self._useipv6)) | |
883 |
|
889 | |||
|
890 | # LOCALIP could be ::1 or 127.0.0.1. Useful for tests that require raw | |||
|
891 | # IP addresses. | |||
|
892 | env['LOCALIP'] = self._localip() | |||
|
893 | ||||
884 | # Reset some environment variables to well-known values so that |
|
894 | # Reset some environment variables to well-known values so that | |
885 | # the tests produce repeatable output. |
|
895 | # the tests produce repeatable output. | |
886 | env['LANG'] = env['LC_ALL'] = env['LANGUAGE'] = 'C' |
|
896 | env['LANG'] = env['LC_ALL'] = env['LANGUAGE'] = 'C' |
General Comments 0
You need to be logged in to leave comments.
Login now