Conversation
0ex-d
left a comment
There was a problem hiding this comment.
Just curious why redeclare
klines_df = historical_klines_response_df
tests/test_historical_klines.py
Outdated
| klines = historical_klines_response | ||
| assert len(klines) == 500 |
There was a problem hiding this comment.
| klines = historical_klines_response | |
| assert len(klines) == 500 | |
| assert len(historical_klines_response) == 500 |
| def test_historical_klines(historical_klines_response_df): | ||
| klines_df = historical_klines_response_df | ||
| assert len(klines_df) == 500 | ||
| assert isinstance(klines_df, DataFrame) |
|
Hi @mrbaguvix thanks for the review.
This was mostly for brevity in reading the test scenarios. But it's not necessary and the long variable name can be used instead. |
extra-requirements.txt
Outdated
| @@ -0,0 +1 @@ | |||
| pandas | |||
There was a problem hiding this comment.
I think, you should define version range: pandas>=n.n.n<n+1
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
|
|
||
| import pytest | ||
| import requests_mock | ||
|
|
There was a problem hiding this comment.
Are you shure, that this file should be stored in project root?
And add module's description
There was a problem hiding this comment.
Confest in the root directory is a best practice to help us avoid adding init files to the test directory. It facilities local imports, especially as they pertain to testing.
https://stackoverflow.com/questions/34466027/in-pytest-what-is-the-use-of-conftest-py-files
Test root path: This is a bit of a hidden feature. By defining conftest.py in your root path, you will have pytest recognizing your application modules without specifying PYTHONPATH. In the background, py.test modifies your sys.path by including all submodules which are found from the root path.

Provides users with an option to return client responses in
pandas.DataFrameformat.Supercedes #1133