Skip to content

Commit 020e4f7

Browse files
committed
format tests
1 parent f005cb3 commit 020e4f7

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

tests/test_functionality.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,12 @@ def test_index_selector_with_wavenumbers_and_dataframe():
288288
def test_index_shift_constant_fill():
289289
# Arrange
290290
spectrum = np.array([[5, 4, 3, 2, 1, 2, 1, 2, 3, 4, 5]])
291-
spectrum_positive_shift = IndexShift(shift=1, fill_method="constant", random_state=44)
292-
spectrum_negative_shift = IndexShift(shift=1, fill_method="constant", random_state=42)
291+
spectrum_positive_shift = IndexShift(
292+
shift=1, fill_method="constant", random_state=44
293+
)
294+
spectrum_negative_shift = IndexShift(
295+
shift=1, fill_method="constant", random_state=42
296+
)
293297

294298
# Act
295299
spectrum_positive_shifted = spectrum_positive_shift.fit_transform(spectrum)
@@ -318,11 +322,16 @@ def test_index_shift_linear_fill():
318322
assert np.isclose(spectrum_positive_shifted[0][0], 6.0, atol=1e-6)
319323
assert np.isclose(spectrum_negative_shifted[0][-1], 6.0, atol=1e-6)
320324

325+
321326
def test_index_shift_quadratic_fill():
322327
# Arrange
323328
spectrum = np.array([[5, 4, 3, 2, 1, 2, 1, 4, 9, 16, 25]])
324-
spectrum_positive_shift = IndexShift(shift=1, fill_method="quadratic", random_state=44)
325-
spectrum_negative_shift = IndexShift(shift=1, fill_method="quadratic", random_state=42)
329+
spectrum_positive_shift = IndexShift(
330+
shift=1, fill_method="quadratic", random_state=44
331+
)
332+
spectrum_negative_shift = IndexShift(
333+
shift=1, fill_method="quadratic", random_state=42
334+
)
326335

327336
# Act
328337
spectrum_positive_shifted = spectrum_positive_shift.fit_transform(spectrum)
@@ -334,6 +343,7 @@ def test_index_shift_quadratic_fill():
334343
assert np.isclose(spectrum_positive_shifted[0][0], 6.0, atol=1e-6)
335344
assert np.isclose(spectrum_negative_shifted[0][-1], 36.0, atol=1e-6)
336345

346+
337347
def test_l1_norm(spectrum):
338348
# Arrange
339349
norm = 1

0 commit comments

Comments
 (0)