Skip to content

Commit

Permalink
Fix fail due to number in prompt bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Makaze committed Dec 1, 2023
1 parent b2bec75 commit 12bbc64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions einstein/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ def test1():
output = check50.run("python3 einstein.py").stdin("1", prompt=False).stdout()

# Extract number from stdout
match = re.search(r"([.,]?(?:\d[.,]?)+)", output)
match = re.findall(r"([.,]?(?:\d[.,]?)+)", output)
if match is None:
raise check50.Failure("Looks like your program didn't output a number!")
number = match.group(0)
number = match[-1]

# Match correct number
if not re.match(r"^90(?:,?0{3}){5}(?:\.0+)?$", number) and not re.match(
Expand Down

0 comments on commit 12bbc64

Please sign in to comment.