1
0
Files
python-dateparser/mark-network-tests.patch
Dirk Mueller de91c33525 - update to 1.2.0:
* New ``PREFER_MONTH_OF_YEAR`` setting (#1146)
  * Absolute years in Russian are no longer being treated as a
    number of years in the past (#1129)
  * Cleanups and internal improvements:
  * Removed the use of ``datetime.utcnow``, deprecated on Python
    3.12 (#1179)
  * Applied Black formatting to the code base (#1158)
  * Initial integration with OSSFuzz (#1198)
  * Extended test cases (#1191)
- Update to 1.1.3
- Update to 1.1.2
  * Implement a PARSERS setting
  * Add support for `PREFER_DATES_FROM` in relative/freshness parser
  * Add support for `PREFER_DAY_OF_MONTH` in base-formats parser
  * Added UTC -00:00 as a valid offset
  * Fix support for “one”
  * Fix tokenizer for non recognized characters
  * Prevent installing regex 2019.02.19

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dateparser?expand=0&rev=38
2023-12-07 20:46:55 +00:00

30 lines
1.1 KiB
Diff

---
tests/test_language_detect.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Index: dateparser-1.2.0/tests/test_language_detect.py
===================================================================
--- dateparser-1.2.0.orig/tests/test_language_detect.py
+++ dateparser-1.2.0/tests/test_language_detect.py
@@ -1,3 +1,4 @@
+import os
import unittest
from datetime import datetime
from unittest.mock import Mock
@@ -17,6 +18,7 @@ from dateparser.search import search_dat
detect_languages = Mock()
detect_languages.return_value = ["en"]
+NO_NETWORK = int(os.environ.get('NO_NETWORK', 0)) == 1
class CustomLangDetectParserTest(unittest.TestCase):
def check_is_returned_list(self):
@@ -28,6 +30,7 @@ class CustomLangDetectParserTest(unittes
param(dt_string="26 July 2021", confidence_threshold=0.0),
]
)
+ @unittest.skipIf(NO_NETWORK, "Test requires network access")
def test_custom_language_detect_fast_text(self, dt_string, confidence_threshold):
self.result = fast_text_detect_languages(dt_string, confidence_threshold)
self.check_is_returned_list()