def test_sum_numpy_func(self): self.assertQuantityEqual(np.sum(self.q, axis=0), [4, 6] * self.ureg.m) self.assertRaises(OffsetUnitCalculusError, np.sum, self.q_temperature)
def test_sum_numpy_func(self): helpers.assert_quantity_equal(np.sum(self.q, axis=0), [4, 6] * self.ureg.m) with pytest.raises(OffsetUnitCalculusError): np.sum(self.q_temperature)