Skip to content

Commit

Permalink
test 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorpela committed Jan 24, 2024
1 parent 5ba2da3 commit 8a33838
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/test_enforce__py38.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
from typing import Optional, TypeVar, Union
from typing import Optional, TypeVar, Union, Literal

from overrides import EnforceOverrides, final, override
from overrides.signature import ensure_signature_is_compatible
Expand Down Expand Up @@ -35,6 +35,18 @@ def nonfinal_classmethod(cls):
return "super_classmethod"


Lit = Literal["foo", "bar"]

class MyBaseClass(EnforceOverrides):
def my_method(self, lit : Lit) -> None:
return

class MySubClass(MyBaseClass):
@override
def my_method(self, lit : Lit) -> None:
return


class EnforceTests(unittest.TestCase):
def test_enforcing_when_all_ok(self):
class Subclazz(Enforcing):
Expand Down

0 comments on commit 8a33838

Please sign in to comment.