Mercurial > babel > mirror
changeset 573:a95f6e35246c trunk
change frontend tests so that they can be run stand-alone (using "python babel/messages/tests/frontend.py") and not just as part of the whole suite
author | fschwarz |
---|---|
date | Mon, 23 Jul 2012 18:55:56 +0000 |
parents | 0d1ca91fc0d5 |
children | 99c48a6ca1d6 |
files | babel/messages/tests/frontend.py |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/babel/messages/tests/frontend.py +++ b/babel/messages/tests/frontend.py @@ -30,11 +30,13 @@ from babel.util import LOCALTZ +this_dir = os.path.abspath(os.path.dirname(__file__)) + class CompileCatalogTestCase(unittest.TestCase): def setUp(self): self.olddir = os.getcwd() - self.datadir = os.path.join(os.path.dirname(__file__), 'data') + self.datadir = os.path.join(this_dir, 'data') os.chdir(self.datadir) _global_log.threshold = 5 # shut up distutils logging @@ -64,7 +66,7 @@ def setUp(self): self.olddir = os.getcwd() - self.datadir = os.path.join(os.path.dirname(__file__), 'data') + self.datadir = os.path.join(this_dir, 'data') os.chdir(self.datadir) _global_log.threshold = 5 # shut up distutils logging @@ -274,7 +276,7 @@ def setUp(self): self.olddir = os.getcwd() - self.datadir = os.path.join(os.path.dirname(__file__), 'data') + self.datadir = os.path.join(this_dir, 'data') os.chdir(self.datadir) _global_log.threshold = 5 # shut up distutils logging @@ -512,7 +514,7 @@ class CommandLineInterfaceTestCase(unittest.TestCase): def setUp(self): - self.datadir = os.path.join(os.path.dirname(__file__), 'data') + self.datadir = os.path.join(this_dir, 'data') self.orig_working_dir = os.getcwd() self.orig_argv = sys.argv self.orig_stdout = sys.stdout