-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: add initial red-tests * feat: add error collector
- Loading branch information
Showing
3 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
"""Test for abcmeta library. | ||
Test for multiple errors. | ||
""" | ||
from typing import Dict, Text, Tuple | ||
|
||
from abcmeta import ABC, abstractmethod | ||
|
||
|
||
class ABCParent(ABC): | ||
@abstractmethod | ||
def method_1(self, name, age): | ||
pass | ||
|
||
@abstractmethod | ||
def method_2(self, name: Text, age: int) -> Dict[Text, Text]: | ||
"""Abstract method.""" | ||
|
||
def method_3(self): | ||
pass | ||
|
||
@abstractmethod | ||
def method_4(self, name: Text, age: int) -> Tuple[Text, Text]: | ||
"""Abstract method.""" | ||
|
||
|
||
class ABCDerived(ABCParent): | ||
def method_(self, name, age): # Intentional typo (Same error as Test 1) | ||
pass | ||
|
||
def method_2(self, name: int, age: int) -> Dict[Text, Text]: # New | ||
return {"name": "test"} | ||
|
||
def method_4(self, family: Text, age: int) -> Tuple[Text, Text]: # Test 4 | ||
return ("name", "test") |