def test_positional_args_of_libgwyfile_func_call(self): """ Test positional args in gwyfile_object_graphcurvemodel_get call First arg is GwyGraphCurveModel* Second arg is GwyfileError** Last arg is NULL """ self.mock_lib.gwyfile_object_graphcurvemodel_get.side_effect = ( self._positional_args_side_effect) GwyGraphCurve._get_data(self.gwycurve, self.npoints)
def test_returned_value(self): """ Test the value returned by _get_data method" """ self.mock_lib.gwyfile_object_graphcurvemodel_get.side_effect = ( self._returned_value_side_effect) data = GwyGraphCurve._get_data(self.gwycurve, self.npoints) np.testing.assert_almost_equal(self.xdata, data[0]) np.testing.assert_almost_equal(self.ydata, data[1])