def test_seq(): p = next(Person.ClassInstances()) p.c = list(range(10)) assert len(Person.db) == 24 p.c = ['things', 44] assert len(Person.db) == 16
def test_multi(): p = next(Person.ClassInstances()) p.m = [1, 2.2, 0, 'a', '', 'c'] assert len(Person.db) == 8 p.m = ['a', 'b', 'c'] assert len(Person.db) == 5
def test_seq(): p = Person.ClassInstances().next() p.c = range(10) assert len(Person.db) == 24 p.c = ['things', 44] assert len(Person.db) == 16
def test_list(): # set and reset a list p = next(Person.ClassInstances()) p.l = [10, 2.3, 0, 'A', '', 'C'] assert len(Person.db) == 18 p.l = [10, 2.3, 0] assert len(Person.db) == 12