Skip to content

Commit

Permalink
Update near-0 filter based on new tokenizer
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiirola committed Jun 24, 2024
1 parent e5973d4 commit c88e0d5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pyomo/common/unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,12 +844,13 @@ def filter_file_contents(self, lines, abstol=None):
# results objects and remote them if they are within
# tolerance of 0
if (
len(item_list) == 2
and item_list[0] == 'Value:'
and type(item_list[1]) is float
and abs(item_list[1]) < (abstol or 0)
and len(filtered[-1]) == 1
and filtered[-1][0][-1] == ':'
len(item_list) == 3
and item_list[0] == 'Value'
and item_list[1] == ':'
and type(item_list[2]) is float
and abs(item_list[2]) < (abstol or 0)
and len(filtered[-1]) == 2
and filtered[-1][1] == ':'
):
filtered.pop()
else:
Expand Down

0 comments on commit c88e0d5

Please sign in to comment.