def test_compare_get_model_new_and_old(): m_new = get_model_new(parfile) m_old = get_model(parfile) assert set(m_new.get_params_mapping().keys()) == set( m_old.get_params_mapping().keys()) assert set(m_new.components.keys()) == set(m_old.components.keys())
def test_compare_get_model_new_and_old_all_parfiles(parfile): if basename(parfile) in bad_trouble: pytest.skip("This parfile is unclear") try: m_old = get_model(parfile) except (ValueError, IOError, MissingParameter) as e: pytest.skip("Existing code raised an exception {}".format(e)) m_new = get_model_new(parfile) assert set(m_new.components.keys()) == set(m_old.components.keys()) assert set(m_new.get_params_mapping().keys()) == set( m_old.get_params_mapping().keys())