Add unit tests for calculator
This commit is contained in:
1 parent
05bfcd65df
commit
2e854cbeb6
2227 files changed
+408232
-1
No files matched your search
@@ -0,0 +1,16 @@
|
||||
from typing import Final
|
||||
|
||||
|
||||
class ParseError(Exception):
|
||||
path: Final[str]
|
||||
lineno: Final[int]
|
||||
msg: Final[str]
|
||||
|
||||
def __init__(self, path: str, lineno: int, msg: str) -> None:
|
||||
super().__init__(path, lineno, msg)
|
||||
self.path = path
|
||||
self.lineno = lineno
|
||||
self.msg = msg
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"{self.path}:{self.lineno + 1}: {self.msg}"
|
||||
Reference in new issue
Block a user