Skip to content

Commit

Permalink
Pass failing unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
hwikle-lanl committed Nov 4, 2024
1 parent fd28ddd commit 2088cda
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion lib/pavilion/cmd_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
PavilionError, TestGroupError
from pavilion.test_run import TestRun, load_tests, TestAttributes
from pavilion.types import ID_Pair
from pavilion.micro import listmap
from pavilion.micro import listmap, partition, flatten, unique, remove_all

LOGGER = logging.getLogger(__name__)

Expand Down
10 changes: 0 additions & 10 deletions lib/pavilion/micro.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,3 @@ def set_default(val: Optional[T], default: T) -> T:
return default

return val

def iterlen(itr: Iterator[T]) -> Tuple[int, Iterator[T]]:
"""Get the length of an iterator. Assumes the iterator is
finite; i.e. it eventually stops yielding new values.
Returns a copy of the iterator with the length. This is
necessary because the original iterator is consumed."""

t1, t2 = tee(itr)

return len(list(t1)), t2

0 comments on commit 2088cda

Please sign in to comment.