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

Mark slow tests #131

Merged
merged 3 commits into from
Apr 25, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: Mark slow tests
  • Loading branch information
lahdjirayhan committed Apr 24, 2022
commit 7847501a1ef95fd4e0c36c607a5594b9802fad65
8 changes: 5 additions & 3 deletions tests/test_get_historical_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
from utils import api, DEFAULT_OUTPUT_FOLDER, DEFAULT_OUTPUT_FILE


# Filterwarnings from: https://stackoverflow.com/a/58645998/11316205
@pytest.mark.vcr
@pytest.mark.filterwarnings(
"ignore::UserWarning"
) # https://stackoverflow.com/a/58645998/11316205
@pytest.mark.slow
@pytest.mark.filterwarnings("ignore::UserWarning")
def test_return_value_and_format():
result = api.get_historical_data(city="london")
assert isinstance(result, pandas.DataFrame)


@pytest.mark.vcr
@pytest.mark.slow
def test_warnings_on_input_combo():
with pytest.warns(UserWarning, match="city_id was not supplied"):
api.get_historical_data(city="london")
Expand All @@ -32,6 +33,7 @@ def test_arguments_not_named():


@pytest.mark.vcr
@pytest.mark.slow
@pytest.mark.filterwarnings("ignore::UserWarning")
def test_correct_data_format():
# Not specifying data format shouldn't create an output directory
Expand Down