def test_totals(self): """ Test calculation of total product and industry outputs""" variables = ac.basic_variables(self.Ut, self.V, self.G) q = variables[6] g = variables[7] npt.assert_equal(q, np.array([2., 5., 11.])) npt.assert_equal(g, np.array([3., 1., 3., 11.]))
def test_summation_vectors(self): """ Tests generation of summation vectors of right dimensions""" variables = ac.basic_variables(self.Ut, self.V, self.G) e_com = variables[4] e_ind = variables[5] npt.assert_equal(e_com, np.array([1., 1., 1.])) npt.assert_equal(e_ind, np.array([1., 1., 1., 1.]))
def test_totals(self): """ Test calculation of total product and industry outputs""" variables = ac.basic_variables(self.Ut, self.V, self.G) q = variables[6] g = variables[7] npt.assert_equal(q, np.array([2., 5., 11.])) npt.assert_equal(g, np.array([3., 1., 3., 11.]))
def test_summation_vectors(self): """ Tests generation of summation vectors of right dimensions""" variables = ac.basic_variables(self.Ut, self.V, self.G) e_com = variables[4] e_ind = variables[5] npt.assert_equal(e_com, np.array([1., 1., 1.])) npt.assert_equal(e_ind, np.array([1., 1., 1., 1.]))
def test_dimensions_detection_untrace(self): """ Tests detection of dimensions and traceability in SuUT""" variables = ac.basic_variables(self.Uu, self.V, self.G) com = variables[0] ind = variables[1] org = variables[2] ext = variables[-1] traceable = variables[3] self.assertEqual(com, 3) self.assertEqual(ind, 4) self.assertEqual(org, 1) self.assertEqual(ext, 2) self.assertFalse(traceable)
def test_dimensions_detection_untrace(self): """ Tests detection of dimensions and traceability in SuUT""" variables = ac.basic_variables(self.Uu, self.V, self.G) com = variables[0] ind = variables[1] org = variables[2] ext = variables[-1] traceable = variables[3] self.assertEqual(com, 3) self.assertEqual(ind, 4) self.assertEqual(org, 1) self.assertEqual(ext, 2) self.assertFalse(traceable)