def test_passStructsInVariadic(): output = StructPassing.how_many_var_args_did_i_pass( 123, TopLevelStruct(required='hello', second_level=1), TopLevelStruct( required='bye', second_level=SecondLevelStruct(deeper_required_prop='ciao'))) assert output == 2
def test_passStructsInVariadic(): output = StructPassing.how_many_var_args_did_i_pass( 123, TopLevelStruct(required="hello", second_level=1), TopLevelStruct( required="bye", second_level=SecondLevelStruct(deeper_required_prop="ciao") ), ) assert output == 2
def test_structEquality(): a = TopLevelStruct(required='bye', second_level=SecondLevelStruct(deeper_required_prop='ciao')) b = TopLevelStruct(required='hello', second_level=1), c = TopLevelStruct(required='hello', second_level=1), d = SecondLevelStruct(deeper_required_prop='exists') assert a != b assert b == c assert a != 5 assert a != d
def test_structEquality(): a = TopLevelStruct( required="bye", second_level=SecondLevelStruct(deeper_required_prop="ciao") ) b = (TopLevelStruct(required="hello", second_level=1),) c = (TopLevelStruct(required="hello", second_level=1),) d = SecondLevelStruct(deeper_required_prop="exists") assert a != b assert b == c assert a != 5 assert a != d