Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_is_dataclass(self):
@dataclass
class A:
pass
class B(NamedTuple):
pass
assert typechecks.is_dataclass(A)
assert not typechecks.is_dataclass(List[int])
assert not typechecks.is_dataclass(Tuple[int, int])
assert not typechecks.is_dataclass(B)
def test_is_dataclass(self):
@dataclass
class A:
pass
class B(NamedTuple):
pass
assert typechecks.is_dataclass(A)
assert not typechecks.is_dataclass(List[int])
assert not typechecks.is_dataclass(Tuple[int, int])
assert not typechecks.is_dataclass(B)
def test_is_dataclass(self):
@dataclass
class A:
pass
class B(NamedTuple):
pass
assert typechecks.is_dataclass(A)
assert not typechecks.is_dataclass(List[int])
assert not typechecks.is_dataclass(Tuple[int, int])
assert not typechecks.is_dataclass(B)
def test_is_dataclass(self):
@dataclass
class A:
pass
class B(NamedTuple):
pass
assert typechecks.is_dataclass(A)
assert not typechecks.is_dataclass(List[int])
assert not typechecks.is_dataclass(Tuple[int, int])
assert not typechecks.is_dataclass(B)