testArg_subresource_Text fails on 3.13.1; additional errors on 3.13.1, 3.11.9 [macOS]
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Run python -m tests using the reproduction environment and inspect tests/test_module_api.py, tests/test_module_cache.py, and api.py:37. Compare the failing Hypothesis examples with the cache setup and teardown paths, including cache.API_CACHE and cache.CACHE_DIR. Done means the reported failures and errors are resolved across the stated Python versions and the full test suite passes.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Operating system: macOS Sequoia 15.2, M3 chip, 2024
To reproduce:
python -m venv ~/pokebase-env
source ~/pokebase-env/bin/activate
# export PATH=$HOME/pokebase-env/bin:$PATH
python -m pip install -U pip
git clone https://github.com/PokeAPI/pokebase
cd pokebase
# git checkout 1.4.0 # also observed on d40c95ce41e62e1d97cefa4ad4ee8d0500c423d9
python -m pip install -e .
python -m pip install hypothesis
python -m tests
Expectation: 0 failures
Observation (on Python 3.13.1):
======================================================================
FAIL: testArg_subresource_Text (tests.test_module_api.TestFunction_get_data.testArg_subresource_Text)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/unittest/mock.py", line 1420, in testArg_subresource_Text
def patched(*args, **keywargs):
^^^^^^^^^^^^^^^^^^^^
File "/Users/pikalaxalt/pokebase-env/lib/python3.13/site-packages/hypothesis/core.py", line 1787, in wrapped_test
raise the_error_hypothesis_found
File "/opt/homebrew/Cellar/[email protected]/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/unittest/mock.py", line 1424, in patched
return func(*newargs, **newkeywargs)
File "/Users/pikalaxalt/pokebase/tests/test_module_api.py", line 106, in testArg_subresource_Text
self.assertIsNotNone(api.get_data(endpoint, resource_id, subresource).get('version_details'))
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: unexpectedly None
Falsifying example: testArg_subresource_Text(
<tests.test_module_api.TestFunction_get_data testMethod=testArg_subresource_Text>,
endpoint='ability',
resource_id=1,
subresource='',
)
Explanation:
These lines were always and only run by failing examples:
/Users/pikalaxalt/pokebase/pokebase/api.py:37
/opt/homebrew/Cellar/[email protected]/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/shelve.py:114
Additionally the following errors are observed in both this version and under python 3.11.9:
======================================================================
ERROR: testEnv_CacheFileNotFound (tests.test_module_cache.TestFunction_load.testEnv_CacheFileNotFound)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/pikalaxalt/pokebase/tests/test_module_cache.py", line 112, in testEnv_CacheFileNotFound
resource_id=integers(min_value=1))
^^^^^^^
File "/Users/pikalaxalt/pokebase-env/lib/python3.13/site-packages/hypothesis/core.py", line 1787, in wrapped_test
raise the_error_hypothesis_found
File "/Users/pikalaxalt/pokebase/tests/test_module_cache.py", line 116, in testEnv_CacheFileNotFound
os.remove(cache.API_CACHE)
~~~~~~~~~^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/pikalaxalt/pokebase/testing/api.cache'
Falsifying example: testEnv_CacheFileNotFound(
self=<tests.test_module_cache.TestFunction_load testMethod=testEnv_CacheFileNotFound>,
endpoint='ability',
resource_id=1,
)
======================================================================
ERROR: testEnv_CacheFileNotFound (tests.test_module_cache.TestFunction_save.testEnv_CacheFileNotFound)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/pikalaxalt/pokebase/tests/test_module_cache.py", line 59, in testEnv_CacheFileNotFound
endpoint=sampled_from(ENDPOINTS),
^^^^^^^
File "/Users/pikalaxalt/pokebase-env/lib/python3.13/site-packages/hypothesis/core.py", line 1787, in wrapped_test
raise the_error_hypothesis_found
File "/Users/pikalaxalt/pokebase/tests/test_module_cache.py", line 63, in testEnv_CacheFileNotFound
os.remove(cache.API_CACHE)
~~~~~~~~~^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/pikalaxalt/pokebase/testing/api.cache'
Falsifying example: testEnv_CacheFileNotFound(
self=<tests.test_module_cache.TestFunction_save testMethod=testEnv_CacheFileNotFound>,
data={'': ''},
endpoint='ability',
resource_id=1,
)
======================================================================
ERROR: testEnv_CacheDirNotFound (tests.test_module_cache.TestFunction_set_cache.testEnv_CacheDirNotFound)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/pikalaxalt/pokebase/tests/test_module_cache.py", line 172, in testEnv_CacheDirNotFound
os.rmdir(cache.CACHE_DIR)
~~~~~~~~^^^^^^^^^^^^^^^^^
OSError: [Errno 66] Directory not empty: '/Users/pikalaxalt/pokebase/testing'
- Ngôn ngữ chính
- Python
- Star
- 361
- Fork
- 58
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của PokeAPI/pokebase
-
Status update Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Strange syntaxing error Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Tất cả issue của PokeAPI/pokebase
Issue tương tự
-
bug priority:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
CyberAgent/psd2svg#436 ·
-
area/install-update comp/cli comp/desktop P3 sweeper:risk-compatibility type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
NousResearch/hermes-agent#122386 · 1 bình luận ·
-
ai-generated
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vllm-project/production-stack#1105 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100