diff --git a/lib/pavilion/cmd_utils.py b/lib/pavilion/cmd_utils.py index a15aae092..01be20e71 100644 --- a/lib/pavilion/cmd_utils.py +++ b/lib/pavilion/cmd_utils.py @@ -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__) diff --git a/lib/pavilion/micro.py b/lib/pavilion/micro.py index 755ce6542..a4b22d744 100644 --- a/lib/pavilion/micro.py +++ b/lib/pavilion/micro.py @@ -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