From 52cdff574b154e72011e5c46ff842add84329f35 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Sun, 25 Nov 2012 17:39:53 +0200 Subject: [PATCH] Test more. --- Makefile | 1 + pysollib/mygettext.py | 4 ++++ pysollib/wizardpresets.py | 2 ++ scripts/gen_individual_importing_tests.py | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 pysollib/mygettext.py diff --git a/Makefile b/Makefile index 146a854b..d10fe22d 100644 --- a/Makefile +++ b/Makefile @@ -60,5 +60,6 @@ mo: cp -f locale/it/LC_MESSAGES/pysol.mo locale/it_IT/LC_MESSAGES/pysol.mo test: + @rm -f tests/individually-importing/*.py # To avoid stray files python scripts/gen_individual_importing_tests.py runprove tests/individually-importing/*.py diff --git a/pysollib/mygettext.py b/pysollib/mygettext.py new file mode 100644 index 00000000..36527112 --- /dev/null +++ b/pysollib/mygettext.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python +# -*- mode: python; coding: utf-8; -*- +def n_(x): + return x diff --git a/pysollib/wizardpresets.py b/pysollib/wizardpresets.py index ee471527..2f2a4b4f 100644 --- a/pysollib/wizardpresets.py +++ b/pysollib/wizardpresets.py @@ -21,6 +21,8 @@ ## ##---------------------------------------------------------------------------## +from pysollib.mygettext import n_ + presets = { 'None': { 'preset': 'None', diff --git a/scripts/gen_individual_importing_tests.py b/scripts/gen_individual_importing_tests.py index 0b7442fd..1fa2ef3f 100644 --- a/scripts/gen_individual_importing_tests.py +++ b/scripts/gen_individual_importing_tests.py @@ -1,6 +1,6 @@ #!/usr/bin/env python import os.path -for module_name in ['pysollib.mfxutil', 'pysollib.move', 'pysollib.settings',]: +for module_name in ['pysollib.mfxutil', 'pysollib.move', 'pysollib.settings', 'pysollib.mygettext', 'pysollib.wizardpresets',]: open(os.path.join(".", "tests", "individually-importing", "import_" + module_name + ".py"), 'w').write('''#!/usr/bin/env python import sys sys.path.append("./tests/lib")