Skip to content

Commit

Permalink
test: test superintend n_samples
Browse files Browse the repository at this point in the history
  • Loading branch information
ebonnal committed Aug 7, 2023
1 parent fb89617 commit fa16ca8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions kioss/pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,7 @@ def iterate():

return timeit.timeit(iterate, number=1)

def superintend(
self, n_samples: int = 0, n_error_samples: int = 8
) -> List[T]:
def superintend(self, n_samples: int = 0, n_error_samples: int = 8) -> List[T]:
"""
Superintend the Pipe: iterate over the pipe until it is exhausted and raise a RuntimeError if any exceptions occur during iteration.
Expand Down
2 changes: 1 addition & 1 deletion test/test_pipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def test_superintend(self):
ValueError,
lambda: Pipe("12-3").map(int).superintend(),
)
self.assertListEqual(Pipe("123").map(int).superintend(n_samples=3), [1, 2, 3])
self.assertListEqual(Pipe("123").map(int).superintend(n_samples=2), [1, 2])

def test_log(self):
self.assertListEqual(
Expand Down

0 comments on commit fa16ca8

Please sign in to comment.