Code Duplication    Length = 17-17 lines in 2 locations

tests/test_omni.py 1 location

@@ 85-101 (lines=17) @@
82
	pd.testing.assert_series_equal(df1_ind, df2_ind)
83
84
85
@pytest.mark.parametrize(
86
	"name, result",
87
	[
88
		("Ap", np.array([56, 39, 27, 18, 32, 15, 32, 22])),
89
		("Kp", np.array([5.3, 4.7, 4.0, 3.3, 4.3, 3.0, 4.3, 3.7])),
90
	]
91
)
92
def test_3hourly_index(name, result, df_o):
93
	df = df_o
94
	np.testing.assert_allclose(
95
		df.loc[
96
			pd.date_range(
97
				"2000-01-01 00:00", "2000-01-01 23:00", freq="3h"
98
			)
99
		][name].values,
100
		result,
101
		rtol=1e-12,
102
	)
103
104

tests/test_read.py 1 location

@@ 106-122 (lines=17) @@
103
	)
104
105
106
@pytest.mark.parametrize(
107
	"name, result",
108
	[
109
		("Ap", np.array([56, 39, 27, 18, 32, 15, 32, 22])),
110
		("Kp", np.array([5.3, 4.7, 4.0, 3.3, 4.3, 3.0, 4.3, 3.7])),
111
	]
112
)
113
def test_3hourly_index(name, result, df_3h):
114
	df = df_3h
115
	np.testing.assert_allclose(
116
		df.loc[
117
			pd.date_range(
118
				"2000-01-01 01:30", "2000-01-01 23:30", freq="3h"
119
			)
120
		][name].values,
121
		result,
122
		rtol=1e-12,
123
	)
124