def test_compare_dict_diff_ndarrays_relative(): lhs = {'a': np.array([100., 200., 300.]), 'b': 2} rhs = {'a': np.array([100., 200., 300.1]), 'b': 2} assert dict_compare("lhs.pkle", lhs, "rhs.pkle", rhs, tol=1e-3, relative=True)
def test_compare_dict_diff_ndarrays2(): from ogindia.utils import dict_compare lhs = {'a': np.array([1., 2., 3.]), 'b': 2} rhs = {'a': np.array([1., 2., 3.1]), 'b': 2} assert not dict_compare("lhs.pkle", lhs, "rhs.pkle", rhs, tol=TOL)
def test_compare_dict_diff_ndarrays(): from ogindia.utils import dict_compare lhs = {'a': np.array([1, 2, 3]), 'b': 2} rhs = {'a': np.array([1, 3]), 'b': 2} assert not dict_compare('lhs.pkle', lhs, 'rhs.pkle', rhs, tol=TOL)
def test_compare_dict_more_lhs(): from ogindia.utils import dict_compare lhs = {'a': 1, 'b': 2, 'c': 3} rhs = {'c': 4, 'b': 2} assert not dict_compare("lhs.pkle", lhs, "rhs.pkle", rhs, tol=TOL)
def test_compare_dict_basic(): from ogindia.utils import dict_compare lhs = {'a': 1, 'b': 2} rhs = {'c': 4, 'b': 2} assert not dict_compare('lhs.pkle', lhs, 'rhs.pkle', rhs, tol=TOL)