|
|
d6c0ba |
From 5dfa1057b809f9bf848916a1001c742cf5229f46 Mon Sep 17 00:00:00 2001
|
|
|
d6c0ba |
From: Tomas Orsava <torsava@redhat.com>
|
|
|
d6c0ba |
Date: Mon, 18 Jun 2018 15:14:52 +0200
|
|
|
d6c0ba |
Subject: [PATCH] Skip tests involving freezegun module which we're not
|
|
|
d6c0ba |
shipping
|
|
|
d6c0ba |
|
|
|
d6c0ba |
---
|
|
|
d6c0ba |
tests/messages/test_frontend.py | 31 +++++++++++++++----------------
|
|
|
d6c0ba |
1 file changed, 15 insertions(+), 16 deletions(-)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
diff --git a/tests/messages/test_frontend.py b/tests/messages/test_frontend.py
|
|
|
d6c0ba |
index 20904a3..236dd5c 100644
|
|
|
d6c0ba |
--- a/tests/messages/test_frontend.py
|
|
|
d6c0ba |
+++ b/tests/messages/test_frontend.py
|
|
|
d6c0ba |
@@ -11,7 +11,6 @@
|
|
|
d6c0ba |
# individuals. For the exact contribution history, see the revision
|
|
|
d6c0ba |
# history and logs, available at http://babel.edgewall.org/log/.
|
|
|
d6c0ba |
import shlex
|
|
|
d6c0ba |
-from freezegun import freeze_time
|
|
|
d6c0ba |
from datetime import datetime
|
|
|
d6c0ba |
from distutils.dist import Distribution
|
|
|
d6c0ba |
from distutils.errors import DistutilsOptionError
|
|
|
d6c0ba |
@@ -150,7 +149,7 @@ class ExtractMessagesTestCase(unittest.TestCase):
|
|
|
d6c0ba |
self.cmd.output_file = self._pot_file()
|
|
|
d6c0ba |
self.assertRaises(DistutilsOptionError, self.cmd.finalize_options)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_extraction_with_default_mapping(self):
|
|
|
d6c0ba |
self.cmd.copyright_holder = 'FooBar, Inc.'
|
|
|
d6c0ba |
self.cmd.msgid_bugs_address = 'bugs.address@email.tld'
|
|
|
d6c0ba |
@@ -208,7 +207,7 @@ msgstr[1] ""
|
|
|
d6c0ba |
actual_content = f.read()
|
|
|
d6c0ba |
self.assertEqual(expected_content, actual_content)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_extraction_with_mapping_file(self):
|
|
|
d6c0ba |
self.cmd.copyright_holder = 'FooBar, Inc.'
|
|
|
d6c0ba |
self.cmd.msgid_bugs_address = 'bugs.address@email.tld'
|
|
|
d6c0ba |
@@ -261,7 +260,7 @@ msgstr[1] ""
|
|
|
d6c0ba |
actual_content = f.read()
|
|
|
d6c0ba |
self.assertEqual(expected_content, actual_content)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_extraction_with_mapping_dict(self):
|
|
|
d6c0ba |
self.dist.message_extractors = {
|
|
|
d6c0ba |
'project': [
|
|
|
d6c0ba |
@@ -392,7 +391,7 @@ class InitCatalogTestCase(unittest.TestCase):
|
|
|
d6c0ba |
self.cmd.output_file = 'dummy'
|
|
|
d6c0ba |
self.assertRaises(DistutilsOptionError, self.cmd.finalize_options)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_with_output_dir(self):
|
|
|
d6c0ba |
self.cmd.input_file = 'project/i18n/messages.pot'
|
|
|
d6c0ba |
self.cmd.locale = 'en_US'
|
|
|
d6c0ba |
@@ -444,7 +443,7 @@ msgstr[1] ""
|
|
|
d6c0ba |
actual_content = f.read()
|
|
|
d6c0ba |
self.assertEqual(expected_content, actual_content)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_keeps_catalog_non_fuzzy(self):
|
|
|
d6c0ba |
self.cmd.input_file = 'project/i18n/messages_non_fuzzy.pot'
|
|
|
d6c0ba |
self.cmd.locale = 'en_US'
|
|
|
d6c0ba |
@@ -496,7 +495,7 @@ msgstr[1] ""
|
|
|
d6c0ba |
actual_content = f.read()
|
|
|
d6c0ba |
self.assertEqual(expected_content, actual_content)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_correct_init_more_than_2_plurals(self):
|
|
|
d6c0ba |
self.cmd.input_file = 'project/i18n/messages.pot'
|
|
|
d6c0ba |
self.cmd.locale = 'lv_LV'
|
|
|
d6c0ba |
@@ -550,7 +549,7 @@ msgstr[2] ""
|
|
|
d6c0ba |
actual_content = f.read()
|
|
|
d6c0ba |
self.assertEqual(expected_content, actual_content)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_correct_init_singular_plural_forms(self):
|
|
|
d6c0ba |
self.cmd.input_file = 'project/i18n/messages.pot'
|
|
|
d6c0ba |
self.cmd.locale = 'ja_JP'
|
|
|
d6c0ba |
@@ -601,7 +600,7 @@ msgstr[0] ""
|
|
|
d6c0ba |
actual_content = f.read()
|
|
|
d6c0ba |
self.assertEqual(expected_content, actual_content)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_supports_no_wrap(self):
|
|
|
d6c0ba |
self.cmd.input_file = 'project/i18n/long_messages.pot'
|
|
|
d6c0ba |
self.cmd.locale = 'en_US'
|
|
|
d6c0ba |
@@ -662,7 +661,7 @@ msgstr[1] ""
|
|
|
d6c0ba |
actual_content = f.read()
|
|
|
d6c0ba |
self.assertEqual(expected_content, actual_content)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_supports_width(self):
|
|
|
d6c0ba |
self.cmd.input_file = 'project/i18n/long_messages.pot'
|
|
|
d6c0ba |
self.cmd.locale = 'en_US'
|
|
|
d6c0ba |
@@ -827,7 +826,7 @@ commands:
|
|
|
d6c0ba |
def assert_pot_file_exists(self):
|
|
|
d6c0ba |
assert os.path.isfile(self._pot_file())
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_extract_with_default_mapping(self):
|
|
|
d6c0ba |
pot_file = self._pot_file()
|
|
|
d6c0ba |
self.cli.run(sys.argv + ['extract',
|
|
|
d6c0ba |
@@ -883,7 +882,7 @@ msgstr[1] ""
|
|
|
d6c0ba |
actual_content = f.read()
|
|
|
d6c0ba |
self.assertEqual(expected_content, actual_content)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_extract_with_mapping_file(self):
|
|
|
d6c0ba |
pot_file = self._pot_file()
|
|
|
d6c0ba |
self.cli.run(sys.argv + ['extract',
|
|
|
d6c0ba |
@@ -934,7 +933,7 @@ msgstr[1] ""
|
|
|
d6c0ba |
actual_content = f.read()
|
|
|
d6c0ba |
self.assertEqual(expected_content, actual_content)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_extract_with_exact_file(self):
|
|
|
d6c0ba |
"""Tests that we can call extract with a particular file and only
|
|
|
d6c0ba |
strings from that file get extracted. (Note the absence of strings from file1.py)
|
|
|
d6c0ba |
@@ -983,7 +982,7 @@ msgstr[1] ""
|
|
|
d6c0ba |
actual_content = f.read()
|
|
|
d6c0ba |
self.assertEqual(expected_content, actual_content)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_init_with_output_dir(self):
|
|
|
d6c0ba |
po_file = self._po_file('en_US')
|
|
|
d6c0ba |
self.cli.run(sys.argv + ['init',
|
|
|
d6c0ba |
@@ -1034,7 +1033,7 @@ msgstr[1] ""
|
|
|
d6c0ba |
def _i18n_dir(self):
|
|
|
d6c0ba |
return os.path.join(self.datadir, 'project', 'i18n')
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_init_singular_plural_forms(self):
|
|
|
d6c0ba |
po_file = self._po_file('ja_JP')
|
|
|
d6c0ba |
self.cli.run(sys.argv + ['init',
|
|
|
d6c0ba |
@@ -1081,7 +1080,7 @@ msgstr[0] ""
|
|
|
d6c0ba |
actual_content = f.read()
|
|
|
d6c0ba |
self.assertEqual(expected_content, actual_content)
|
|
|
d6c0ba |
|
|
|
d6c0ba |
- @freeze_time("1994-11-11")
|
|
|
d6c0ba |
+ @pytest.mark.skip(reason="Not shipping the freezegun module")
|
|
|
d6c0ba |
def test_init_more_than_2_plural_forms(self):
|
|
|
d6c0ba |
po_file = self._po_file('lv_LV')
|
|
|
d6c0ba |
self.cli.run(sys.argv + ['init',
|
|
|
d6c0ba |
--
|
|
|
d6c0ba |
2.14.4
|
|
|
d6c0ba |
|