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