def test_compare_not_equal(self): with self.assertRaises(Exception) as ex: compare_dicts(self.dict2, self.dict3) self.assertEqual("Dicts are not equal", str(ex.exception))
def test_compare_not_equal(self, setup): with pytest.raises(Exception) as exepinfo: compare_dicts(self.dict2, self.dict3) assert "Dicts are not equal" in str(exepinfo.value)
def test_compare_equal(self): result = compare_dicts(self.dict1, self.dict2) self.assertIsNone(result)
def test_compare_equal(self, setup): result = compare_dicts(self.dict1, self.dict2) assert result is None