Skip to content

Commit

Permalink
Cleaning up test prints
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Nov 1, 2024
1 parent 70b8186 commit 1ce6d8e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
7 changes: 0 additions & 7 deletions armi/utils/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,19 +261,12 @@ def extend(cls, fields: Dict[str, Union[int, auto]]):
<MyFlags.SUPER: 8>
"""
# add explicit values first, so that autos know about them
print("=============================")
print(fields)
print("=============================")
for field, value in ((f, v) for f, v in fields.items() if isinstance(v, int)):
print(field, value)
cls._registerField(field, value)
toResolve = [field for field, val in fields.items() if isinstance(val, auto)]
resolved = cls._resolveAutos(toResolve)
print("xxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
for field, value in resolved:
print(field, value)
cls._registerField(field, value)
print("-----------------------------")

def to_bytes(self, byteorder="little"):
"""
Expand Down
9 changes: 0 additions & 9 deletions armi/utils/tests/test_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,6 @@ class F(Flag):
F.extend({"A": auto(), "B": 8, "C": auto(), "D": auto(), "E": auto()})

self.assertEqual(int(F.B), 8)

import math

print("...............................")
print(F)
print(F.width())
print(F._nameToValue)
print(len(F._nameToValue))
print(math.ceil(len(F._nameToValue) / 8))
self.assertEqual(F.width(), 1)

F.extend({"LAST": auto()})
Expand Down

0 comments on commit 1ce6d8e

Please sign in to comment.