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

Datesearch: test broken #550

Closed
JulienPeloton opened this issue Jan 8, 2024 · 3 comments
Closed

Datesearch: test broken #550

JulienPeloton opened this issue Jan 8, 2024 · 3 comments
Labels
bug Something isn't working public API
Milestone

Comments

@JulienPeloton
Copy link
Member

Recent log:

./api_datesearch_test.py
**********************************************************************
File "./api_datesearch_test.py", line 66, in __main__.test_bad_datesearch
Failed example:
    test_bad_datesearch()
Exception raised:
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/doctest.py", line 1337, in __run
        compileflags, 1), test.globs)
      File "<doctest __main__.test_bad_datesearch[0]>", line 1, in <module>
        test_bad_datesearch()
      File "./api_datesearch_test.py", line 82, in test_bad_datesearch
        assert r.text == str(msg)
    AssertionError
**********************************************************************
File "./api_datesearch_test.py", line 52, in __main__.test_simple_datesearch
Failed example:
    test_simple_datesearch()
Exception raised:
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/doctest.py", line 1337, in __run
        compileflags, 1), test.globs)
      File "<doctest __main__.test_simple_datesearch[0]>", line 1, in <module>
        test_simple_datesearch()
      File "./api_datesearch_test.py", line 58, in test_simple_datesearch
        assert len(pdf) == 407, len(pdf)
    AssertionError: 996
@JulienPeloton JulienPeloton added bug Something isn't working public API labels Jan 8, 2024
@JulienPeloton JulienPeloton added this to the Public API milestone Jan 8, 2024
@JulienPeloton
Copy link
Member Author

JulienPeloton commented Jan 8, 2024

Note that with recent change (see #541 ), the parameter window for datesearch (only) is restricted to maximum 3 hours. Test should reflect this, and this threshold should be documented in the API.

@karpov-sv
Copy link
Collaborator

Yes, simple test fails because it is now in days, not minutes - it is easy to fix. The second one is trickier - now the API does not provide an error message, but just crops the window to 3 hours if it is larger than that. Is it correct behaviour, or we should return the error in this case instead?..

@JulienPeloton
Copy link
Member Author

Fixed in #557

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

No branches or pull requests

2 participants