Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] test_func_wrapper - test_add_invalid_method - puzzle #16

Open
evelynmitchell opened this issue Dec 22, 2023 · 1 comment
Open
Assignees
Labels
bug Something isn't working Fund no-issue-activity

Comments

@evelynmitchell
Copy link
Contributor

evelynmitchell commented Dec 22, 2023

In a container, with pytest-benchmark installed, python 3.10.13

pytest test_func_wrapper.py 
================================= test session starts =================================
platform linux -- Python 3.10.13, pytest-7.4.3, pluggy-1.3.0
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /usr/src/swarm_cloud/tests
plugins: benchmark-4.0.0, time-machine-2.13.0, anyio-3.7.1
collected 17 items                                                                    

test_func_wrapper.py .FF..FFFFFFFFFFFF                                          [100%]

====================================== FAILURES =======================================
_______________________________ test_add_invalid_method _______________________________

func_api_wrapper = <swarms_cloud.func_api_wrapper.SwarmCloud object at 0x7fa99c933cd0>

    def test_add_invalid_method(func_api_wrapper):
>       with pytest.raises(ValueError):
E       Failed: DID NOT RAISE <class 'ValueError'>

test_func_wrapper.py:42: Failed
---------------------------------- Captured log call ----------------------------------
INFO     swarms_cloud.func_api_wrapper:func_api_wrapper.py:93 Error in test_endpoint: Invalid method: invalid

I've looked at the decorator code, and it should throw a ValueError for an invalid method, if I'm reading it correctly, so I don't know why this is failing. That it gets to the endpoint at all is the puzzle. The decorator shouldn't let it get that far.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@evelynmitchell evelynmitchell added the bug Something isn't working label Dec 22, 2023
Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fund no-issue-activity
Projects
None yet
Development

No branches or pull requests

2 participants