summaryrefslogtreecommitdiff
path: root/tests/regressiontests/makemessages/tests.py
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2010-10-10 22:19:01 +0000
committerRamiro Morales <cramm0@gmail.com>2010-10-10 22:19:01 +0000
commitb79daef8676df78fabb70a686374aebeccdd6db0 (patch)
tree6d7161344efed35dd1a69a048a516444657aeaa9 /tests/regressiontests/makemessages/tests.py
parent20fa9ddb7183707d707a8c703b6f28b02efc80db (diff)
Consolidated i18n commands test with the rest of the i18n tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14133 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/makemessages/tests.py')
-rw-r--r--tests/regressiontests/makemessages/tests.py43
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/regressiontests/makemessages/tests.py b/tests/regressiontests/makemessages/tests.py
deleted file mode 100644
index c3be2178e4..0000000000
--- a/tests/regressiontests/makemessages/tests.py
+++ /dev/null
@@ -1,43 +0,0 @@
-import os
-import re
-from subprocess import Popen, PIPE
-
-def find_command(cmd, path=None, pathext=None):
- if path is None:
- path = os.environ.get('PATH', []).split(os.pathsep)
- if isinstance(path, basestring):
- path = [path]
- # check if there are funny path extensions for executables, e.g. Windows
- if pathext is None:
- pathext = os.environ.get('PATHEXT', '.COM;.EXE;.BAT;.CMD').split(os.pathsep)
- # don't use extensions if the command ends with one of them
- for ext in pathext:
- if cmd.endswith(ext):
- pathext = ['']
- break
- # check if we find the command on PATH
- for p in path:
- f = os.path.join(p, cmd)
- if os.path.isfile(f):
- return f
- for ext in pathext:
- fext = f + ext
- if os.path.isfile(fext):
- return fext
- return None
-
-# checks if it can find xgettext on the PATH and
-# imports the extraction tests if yes
-xgettext_cmd = find_command('xgettext')
-if xgettext_cmd:
- p = Popen('%s --version' % xgettext_cmd, shell=True, stdout=PIPE, stderr=PIPE, close_fds=os.name != 'nt', universal_newlines=True)
- output = p.communicate()[0]
- match = re.search(r'(?P<major>\d+)\.(?P<minor>\d+)', output)
- if match:
- xversion = (int(match.group('major')), int(match.group('minor')))
- if xversion >= (0, 15):
- from extraction import *
- del p
-
-if find_command('msgfmt'):
- from compilation import *