Skip to content

Commit

Permalink
update percentage pattern matching
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandip117 committed Aug 16, 2024
1 parent cd71d63 commit 50860de
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lld_chxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import os
from shutil import copytree, ignore_patterns

__version__ = '1.0.4'
__version__ = '1.0.5'

DISPLAY_TITLE = r"""
_ _ _ _ _
Expand Down Expand Up @@ -157,7 +157,8 @@ def analyze_measurements(data, tagStruct, unit, diff):
print("Measurement units do not match.")
return status

match = re.search(r'\d.\d%',measurements['Difference']).group()
match = re.search(r'\d+\.\d+%',measurements['Difference']).group()
print(match)
difference = match.replace('%','')
if not float(difference) <= diff:
status['error'] = f"Allowed difference {diff}%, actual difference {difference}%"
Expand Down

0 comments on commit 50860de

Please sign in to comment.