def test_missing_coeff(self): reg1 = results_factory(['x1', 'x2'], [3.14159, 1.59], [1.41343, 2.02], [0.035, 0.123]) reg2 = results_factory(['x3', 'x2'], [3.1111, 1.39], [1.4134, 2.02], [0.005, 0.123]) table_str = table_mainrow("Coeff 1", 'x1', (reg1, reg2), name_just=10, stat_just=10) expected = ("Coeff 1 & 3.142** & \\\\ \n" " & (1.413) & \\\\ \n") assert table_str == expected
def test_se_brackets(self): reg1 = results_factory(['x1', 'x2'], [3.14159, 1.59], [1.41343, 2.02], [0.035, 0.123]) reg2 = results_factory(['x1', 'x2'], [3.1111, 1.39], [1.4134, 2.02], [0.005, 0.123]) table_str = table_mainrow("Coeff 1", 'x1', (reg1, reg2), name_just=10, stat_just=10, se="[") expected = ("Coeff 1 & 3.142** & 3.111*** \\\\ \n" " & [1.413] & [1.413] \\\\ \n") assert table_str == expected
def test_basic(self): reg1 = results_factory(['x1', 'x2'], [3.14159, 1.59], [1.41343, 2.02], [0.035, 0.123]) reg2 = results_factory(['x1', 'x2'], [3.1111, 1.39], [1.4134, 2.02], [0.005, 0.123]) table_str = table_mainrow("Coeff 1", 'x1', (reg1, reg2), name_just=10, stat_just=10) expected = ( "Coeff 1 & 3.142** & 3.111*** \\\\ \n" " & (1.413) & (1.413) \\\\ \n" ) assert_equal(table_str, expected)
def test_basic(self): reg1 = results_factory(['x1', 'x2'], [3.14159, 1.59], [1.41343, 2.02], [0.035, 0.123]) reg2 = results_factory(['x1', 'x2'], [3.1111, 1.39], [1.4134, 2.02], [0.005, 0.123]) table_str = table_mainrow("Coeff 1", 'x1', (reg1, reg2), name_just=10, stat_just=10) expected = ( "Coeff 1 & 3.142** & 3.111*** \\\\ \n" " & (1.413) & (1.413) \\\\ \n" ) assert table_str == expected