Enable tests when building
This commit is contained in:
parent
c154b2996c
commit
15fba86d78
5 changed files with 118 additions and 3 deletions
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -1,5 +1,6 @@
|
||||||
kitchen (1.1.1-1) UNRELEASED; urgency=low
|
kitchen (1.1.1-1) UNRELEASED; urgency=low
|
||||||
|
|
||||||
* Initial release. (Closes: #705930)
|
* Initial release. (Closes: #705930)
|
||||||
|
* Patch the test set to use consistent locale naming (forwarded)
|
||||||
|
|
||||||
-- Simon Chopin <chopin.simon@gmail.com> Mon, 22 Apr 2013 21:16:39 +0200
|
-- Simon Chopin <chopin.simon@gmail.com> Mon, 22 Apr 2013 21:16:39 +0200
|
||||||
|
|
12
debian/control
vendored
12
debian/control
vendored
|
@ -3,7 +3,13 @@ Section: python
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
|
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
|
||||||
Uploaders: Simon Chopin <chopin.simon@gmail.com>
|
Uploaders: Simon Chopin <chopin.simon@gmail.com>
|
||||||
Build-Depends: debhelper (>= 8), python-all (>= 2.6.6-3~), python-setuptools
|
Build-Depends:
|
||||||
|
debhelper (>= 8),
|
||||||
|
python-all (>= 2.6.6-3~),
|
||||||
|
libc-bin,
|
||||||
|
locales,
|
||||||
|
python-nose,
|
||||||
|
python-setuptools
|
||||||
Standards-Version: 3.9.4
|
Standards-Version: 3.9.4
|
||||||
X-Python-Version: >= 2.3
|
X-Python-Version: >= 2.3
|
||||||
Homepage: https://fedorahosted.org/kitchen/
|
Homepage: https://fedorahosted.org/kitchen/
|
||||||
|
@ -20,5 +26,5 @@ Description: Mix of useful Python code
|
||||||
.
|
.
|
||||||
A non-exhaustive list of the features provided by kitchen:
|
A non-exhaustive list of the features provided by kitchen:
|
||||||
* helpers for text and specifically unicode handling i18n support
|
* helpers for text and specifically unicode handling i18n support
|
||||||
* Compatibility layers from 2.3 'til 2.7. A dictionary that treats unicode
|
* Compatibility layers from 2.3 'til 2.7.
|
||||||
* and str as different values
|
* A dictionary that treats unicode and str strings as different values
|
||||||
|
|
90
debian/patches/normalize_test_unicode_name
vendored
Normal file
90
debian/patches/normalize_test_unicode_name
vendored
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
Description: Normalize the locale names when testing i18n features
|
||||||
|
Author: Simon Chopin <chopin.simon@gmail.com>
|
||||||
|
Bug: <URL to the upstream bug report if any, implies patch has been forwarded, optional>
|
||||||
|
Applied-Upstream: <version|URL|commit, identifies patches merged upstream, optional>
|
||||||
|
Last-Update: 2013-04-23
|
||||||
|
---
|
||||||
|
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||||
|
--- a/tests/test_i18n.py
|
||||||
|
+++ b/tests/test_i18n.py
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
class TestI18N_UTF8(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.old_LC_ALL = os.environ.get('LC_ALL', None)
|
||||||
|
- os.environ['LC_ALL'] = 'pt_BR.UTF8'
|
||||||
|
+ os.environ['LC_ALL'] = 'pt_BR.UTF-8'
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
if self.old_LC_ALL:
|
||||||
|
@@ -331,7 +331,7 @@
|
||||||
|
class TestI18N_Latin1(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.old_LC_ALL = os.environ.get('LC_ALL', None)
|
||||||
|
- os.environ['LC_ALL'] = 'pt_BR.ISO8859-1'
|
||||||
|
+ os.environ['LC_ALL'] = 'pt_BR.ISO-8859-1'
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
if self.old_LC_ALL:
|
||||||
|
@@ -357,7 +357,7 @@
|
||||||
|
class TestNewGNUTranslationsNoMatch(TestDummyTranslations):
|
||||||
|
def setUp(self):
|
||||||
|
self.old_LC_ALL = os.environ.get('LC_ALL', None)
|
||||||
|
- os.environ['LC_ALL'] = 'pt_BR.utf8'
|
||||||
|
+ os.environ['LC_ALL'] = 'pt_BR.UTF-8'
|
||||||
|
self.translations = i18n.get_translation_object('test', ['%s/data/locale/' % os.path.dirname(__file__)])
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
@@ -370,7 +370,7 @@
|
||||||
|
class TestNewGNURealTranslations_UTF8(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.old_LC_ALL = os.environ.get('LC_ALL', None)
|
||||||
|
- os.environ['LC_ALL'] = 'pt_BR.UTF8'
|
||||||
|
+ os.environ['LC_ALL'] = 'pt_BR.UTF-8'
|
||||||
|
self.translations = i18n.get_translation_object('test', ['%s/data/locale/' % os.path.dirname(__file__)])
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
@@ -455,7 +455,7 @@
|
||||||
|
class TestNewGNURealTranslations_Latin1(TestNewGNURealTranslations_UTF8):
|
||||||
|
def setUp(self):
|
||||||
|
self.old_LC_ALL = os.environ.get('LC_ALL', None)
|
||||||
|
- os.environ['LC_ALL'] = 'pt_BR.ISO8859-1'
|
||||||
|
+ os.environ['LC_ALL'] = 'pt_BR.ISO-8859-1'
|
||||||
|
self.translations = i18n.get_translation_object('test', ['%s/data/locale/' % os.path.dirname(__file__)])
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
@@ -511,7 +511,7 @@
|
||||||
|
class TestFallbackNewGNURealTranslations_UTF8(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.old_LC_ALL = os.environ.get('LC_ALL', None)
|
||||||
|
- os.environ['LC_ALL'] = 'pt_BR.UTF8'
|
||||||
|
+ os.environ['LC_ALL'] = 'pt_BR.UTF-8'
|
||||||
|
self.translations = i18n.get_translation_object('test',
|
||||||
|
['%s/data/locale/' % os.path.dirname(__file__),
|
||||||
|
'%s/data/locale-old' % os.path.dirname(__file__)])
|
||||||
|
@@ -598,7 +598,7 @@
|
||||||
|
class TestFallbackNewGNURealTranslations_Latin1(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.old_LC_ALL = os.environ.get('LC_ALL', None)
|
||||||
|
- os.environ['LC_ALL'] = 'pt_BR.ISO8859-1'
|
||||||
|
+ os.environ['LC_ALL'] = 'pt_BR.ISO-8859-1'
|
||||||
|
self.translations = i18n.get_translation_object('test',
|
||||||
|
['%s/data/locale/' % os.path.dirname(__file__),
|
||||||
|
'%s/data/locale-old' % os.path.dirname(__file__)])
|
||||||
|
@@ -685,7 +685,7 @@
|
||||||
|
class TestFallback(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.old_LC_ALL = os.environ.get('LC_ALL', None)
|
||||||
|
- os.environ['LC_ALL'] = 'pt_BR.ISO8859-1'
|
||||||
|
+ os.environ['LC_ALL'] = 'pt_BR.ISO-8859-1'
|
||||||
|
self.gtranslations = i18n.get_translation_object('test',
|
||||||
|
['%s/data/locale/' % os.path.dirname(__file__),
|
||||||
|
'%s/data/locale-old' % os.path.dirname(__file__)])
|
||||||
|
@@ -721,7 +721,7 @@
|
||||||
|
class TestDefaultLocaleDir(unittest.TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
self.old_LC_ALL = os.environ.get('LC_ALL', None)
|
||||||
|
- os.environ['LC_ALL'] = 'pt_BR.UTF8'
|
||||||
|
+ os.environ['LC_ALL'] = 'pt_BR.UTF-8'
|
||||||
|
self.old_DEFAULT_LOCALEDIRS = i18n._DEFAULT_LOCALEDIR
|
||||||
|
i18n._DEFAULT_LOCALEDIR = '%s/data/locale/' % os.path.dirname(__file__)
|
||||||
|
self.translations = i18n.get_translation_object('test')
|
1
debian/patches/series
vendored
Normal file
1
debian/patches/series
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
normalize_test_unicode_name
|
17
debian/rules
vendored
17
debian/rules
vendored
|
@ -2,3 +2,20 @@
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@ --with python2
|
dh $@ --with python2
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
||||||
|
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
|
||||||
|
mkdir -p debian/tmp/locales
|
||||||
|
localedef -f UTF-8 -i en_US ./debian/tmp/locales/en_US.UTF-8/
|
||||||
|
localedef -f UTF-8 -i pt_BR ./debian/tmp/locales/pt_BR.UTF-8/
|
||||||
|
localedef -f ISO-8859-1 -i pt_BR ./debian/tmp/locales/pt_BR.ISO-8859-1/
|
||||||
|
set -e
|
||||||
|
echo $(shell pwd)
|
||||||
|
for py in $(shell pyversions -r); do \
|
||||||
|
LOCPATH=$(CURDIR)/debian/tmp/locales/ $$py /usr/bin/nosetests tests; \
|
||||||
|
done
|
||||||
|
endif
|
||||||
|
|
||||||
|
override_dh_auto_clean:
|
||||||
|
rm -rf @test* kitchen.egg-info
|
||||||
|
dh_auto_clean
|
||||||
|
|
Loading…
Reference in a new issue