def test_general_eq_different_attributes(): similar_nt = namedtuple('nt', nt_attributes + ['supbro']) b = similar_nt(a.this, a.that, a.phi, a.mechanism, a.purview, supbro="nothin' much") assert models._general_eq(a, b, nt_attributes)
def test_general_eq_different_mechanism_and_purview_order(): b = nt(a.this, a.that, a.phi, a.mechanism[::-1], a.purview[::-1]) assert models._general_eq(a, b, nt_attributes)
def test_general_eq_phi_precision_comparison_false(): b = nt(a.this, a.that, (a.phi - constants.EPSILON*2), a.mechanism, a.purview) assert not models._general_eq(a, b, nt_attributes)
def test_general_eq_different_purview_order(): b = nt(a.this, a.that, a.phi, a.mechanism, a.purview[::-1]) assert models._general_eq(a, b, nt_attributes)
def test_general_eq_phi_precision_comparison_false(): b = nt(a.this, a.that, (a.phi - constants.EPSILON * 2), a.mechanism, a.purview) assert not models._general_eq(a, b, nt_attributes)