diff options
| author | maxim-yurchuk <[email protected]> | 2024-10-09 12:29:46 +0300 |
|---|---|---|
| committer | maxim-yurchuk <[email protected]> | 2024-10-09 13:14:22 +0300 |
| commit | 9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch) | |
| tree | a8fb3181d5947c0d78cf402aa56e686130179049 /contrib/python/pytz/py3/patches/01-fix-tests.patch | |
| parent | a44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff) | |
publishFullContrib: true for ydb
<HIDDEN_URL>
commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/python/pytz/py3/patches/01-fix-tests.patch')
| -rw-r--r-- | contrib/python/pytz/py3/patches/01-fix-tests.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/contrib/python/pytz/py3/patches/01-fix-tests.patch b/contrib/python/pytz/py3/patches/01-fix-tests.patch new file mode 100644 index 00000000000..c3a5fd0c379 --- /dev/null +++ b/contrib/python/pytz/py3/patches/01-fix-tests.patch @@ -0,0 +1,51 @@ +--- contrib/python/pytz/py3/pytz/tests/test_docs.py (index) ++++ contrib/python/pytz/py3/pytz/tests/test_docs.py (working tree) +@@ -1,34 +1,15 @@ + # -*- coding: ascii -*- + +-from doctest import DocFileSuite +-import unittest +-import os.path +-import sys ++import doctest + +-THIS_DIR = os.path.dirname(__file__) ++import pytz ++import pytz.tzinfo + +-README = os.path.join(THIS_DIR, os.pardir, os.pardir, 'README.rst') ++def test_doctest_pytz(): ++ nfailures, ntests = doctest.testmod(pytz) ++ assert not nfailures + + +-class DocumentationTestCase(unittest.TestCase): +- def test_readme_encoding(self): +- '''Confirm the README.rst is ASCII.''' +- f = open(README, 'rb') +- try: +- f.read().decode('ASCII') +- finally: +- f.close() +- +- +-def test_suite(): +- "For the Z3 test runner" +- return unittest.TestSuite(( +- DocumentationTestCase('test_readme_encoding'), +- DocFileSuite(os.path.join(os.pardir, os.pardir, 'README.rst')))) +- +- +-if __name__ == '__main__': +- sys.path.insert( +- 0, os.path.abspath(os.path.join(THIS_DIR, os.pardir, os.pardir)) +- ) +- unittest.main(defaultTest='test_suite') ++def test_doctest_pytz_tzinfo(): ++ nfailures, ntests = doctest.testmod(pytz.tzinfo) ++ assert not nfailures +--- contrib/python/pytz/py3/pytz/tests/test_tzinfo.py (index) ++++ contrib/python/pytz/py3/pytz/tests/test_tzinfo.py (working tree) +@@ -857,1 +857,1 @@ class DstTzInfoTestCase(unittest.TestCase, BaseTzInfoTestCase): +-def test_suite(): ++def _test_suite(): |
