Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:ecsos:python
python-dateparser
mark-network-tests.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mark-network-tests.patch of Package python-dateparser
--- 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()
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor