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