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

Reduce runtimes of some more tests #4991

Merged
merged 1 commit into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion sunpy/net/tests/strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def TimeDelta(draw):
abs max is about 10 weeks + 10 days + 10 hours + 10 minutes + a bit
"""
st.sampled_from(['weeks', 'days', 'hours', 'minutes', 'seconds'])
values = st.floats(min_value=1, max_value=10)
time_dict = {'days': st.floats(min_value=1, max_value=8),
'hours': st.floats(min_value=1, max_value=12),
'minutes': st.floats(min_value=1, max_value=30),
Expand Down
8 changes: 4 additions & 4 deletions sunpy/net/tests/test_fido.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def online_query(draw, instrument=online_instruments()):


@no_vso
@settings(deadline=50000)
@settings(deadline=50000, max_examples=10)
@given(offline_query())
def test_offline_fido(query):
unifiedresp = Fido.search(query)
Expand Down Expand Up @@ -284,7 +284,7 @@ def test_path_read_only(tmp_path):


@no_vso
@settings(deadline=50000)
@settings(deadline=50000, max_examples=10)
@given(st.tuples(offline_query(), offline_query()).filter(filter_queries))
def test_fido_indexing(queries):
query1, query2 = queries
Expand Down Expand Up @@ -357,7 +357,7 @@ def test_fido_indexing(queries):


@no_vso
@settings(deadline=50000)
@settings(deadline=50000, max_examples=10)
@given(st.tuples(offline_query(), offline_query()).filter(filter_queries))
def test_fido_iter(queries):
query1, query2 = queries
Expand All @@ -373,7 +373,7 @@ def test_fido_iter(queries):


@no_vso
@settings(deadline=50000)
@settings(deadline=50000, max_examples=10)
@given(offline_query())
def test_repr2(query):
res = Fido.search(query)
Expand Down
7 changes: 4 additions & 3 deletions sunpy/timeseries/tests/test_timeseriesbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,11 +635,12 @@ def test_concatenation_different_data_list_error(eve_test_ts, fermi_gbm_test_ts)


def test_generic_construction_concatenation():
nrows = 10
# Generate the data and the corrisponding dates
base = parse_time(datetime.datetime.today())
times = base - TimeDelta(np.arange(24 * 60)*u.minute)
intensity1 = np.sin(np.arange(0, 12 * np.pi, ((12 * np.pi) / (24 * 60))))
intensity2 = np.sin(np.arange(0, 12 * np.pi, ((12 * np.pi) / (24 * 60))))
times = base - TimeDelta(np.arange(nrows)*u.minute)
intensity1 = np.sin(np.arange(0, 12 * np.pi, ((12 * np.pi) / (nrows))))
intensity2 = np.sin(np.arange(0, 12 * np.pi, ((12 * np.pi) / (nrows))))

# Create the data DataFrame, header MetaDict and units OrderedDict
data = DataFrame(intensity1, index=times, columns=['intensity'])
Expand Down