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 Sep 30, 2024
1 parent dde080f commit 1451f98
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 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
2 changes: 1 addition & 1 deletion test/tests/utils_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_owner(self):
# Try to set the permissions of the file to an unknown user.
proc = sp.Popen(['sudo', '-n', 'chown', '12341', path.as_posix()],
stdout=sp.PIPE, stderr=sp.PIPE, stdin=sp.PIPE)
if proc.wait(1) == 0:
if proc.wait(2) == 0:
self.assertEqual(utils.owner(path), "<unknown user '12341'>")

def test_relative_to(self):
Expand Down

0 comments on commit 1451f98

Please sign in to comment.