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_namedtuple(self):
A = NamedTuple('A', [
('val', int),
])
assert typechecks.is_namedtuple(A)
assert not typechecks.is_namedtuple(Tuple)
assert not typechecks.is_namedtuple(tuple)
assert not typechecks.is_namedtuple(Tuple[int, int])
def test_is_namedtuple(self):
A = NamedTuple('A', [
('val', int),
])
assert typechecks.is_namedtuple(A)
assert not typechecks.is_namedtuple(Tuple)
assert not typechecks.is_namedtuple(tuple)
assert not typechecks.is_namedtuple(Tuple[int, int])
def test_is_namedtuple(self):
A = NamedTuple('A', [
('val', int),
])
assert typechecks.is_namedtuple(A)
assert not typechecks.is_namedtuple(Tuple)
assert not typechecks.is_namedtuple(tuple)
assert not typechecks.is_namedtuple(Tuple[int, int])
def test_is_namedtuple(self):
A = NamedTuple('A', [
('val', int),
])
assert typechecks.is_namedtuple(A)
assert not typechecks.is_namedtuple(Tuple)
assert not typechecks.is_namedtuple(tuple)
assert not typechecks.is_namedtuple(Tuple[int, int])