Mercurial > hgsubversion
comparison tests/test_util.py @ 644:95abc4cfc78f
tests: improve import logic
We already had some logic some logic to make us import the local
modules, but it failed under certain circumstances. I suspect that it
had to do with absolute vs. relative paths. Regardless of what the
root cause was, this fixes it.
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Wed, 14 Jul 2010 15:39:21 +0200 |
parents | 8e621dbb82d4 |
children | 3cb5042531fb |
comparison
equal
deleted
inserted
replaced
643:d2ef7220a079 | 644:95abc4cfc78f |
---|---|
10 import sys | 10 import sys |
11 import tempfile | 11 import tempfile |
12 import unittest | 12 import unittest |
13 import urllib | 13 import urllib |
14 | 14 |
15 import __init__ | 15 _rootdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
16 sys.path.insert(0, _rootdir) | |
16 | 17 |
17 from mercurial import commands | 18 from mercurial import commands |
18 from mercurial import context | 19 from mercurial import context |
19 from mercurial import hg | 20 from mercurial import hg |
20 from mercurial import i18n | 21 from mercurial import i18n |