def test_build_initial_display_table_with_fixed_sample(self): self.cm = YouConstraintManager(None, {'mu': 0}) print self.cm.build_display_table_lines() eq_(self.cm.build_display_table_lines(), [' DET REF SAMP', ' ====== ====== ======', ' delta a_eq_b eta', ' %s alpha chi' % NUNAME.ljust(6), ' qaz beta phi', ' naz psi'])
def test_build_initial_display_table_with_fixed_sample(self): self.cm = YouConstraintManager(None, {'mu': 0}) print self.cm.build_display_table_lines() eq_(self.cm.build_display_table_lines(), [ ' DET REF SAMP', ' ------ ------ ------', ' delta a_eq_b eta', ' %s alpha chi' % NUNAME.ljust(6), ' qaz beta phi', ' naz psi' ])
def test_build_display_table(self): self.cm.constrain('qaz') self.cm.constrain('alpha') self.cm.constrain('eta') self.cm.set_constraint('qaz', 1.234) self.cm.set_constraint('eta', 99.) print '\n'.join(self.cm.build_display_table_lines()) eq_(self.cm.build_display_table_lines(), [ ' DET REF SAMP', ' ------ ------ ------', ' delta a_eq_b mu', ' %s o-> alpha --> eta' % NUNAME.ljust(6), '--> qaz beta chi', ' naz psi phi', ' mu_is_%s' % NUNAME ])
def test_build_display_table(self): self.cm.constrain('qaz') self.cm.constrain('alpha') self.cm.constrain('eta') self.cm.set_constraint('qaz', 1.234) self.cm.set_constraint('eta', 99.) print self.cm.build_display_table_lines() eq_(self.cm.build_display_table_lines(), [' DET REF SAMP', ' ====== ====== ======', ' delta a_eq_b mu', ' %s o-> alpha --> eta' % NUNAME.ljust(6), '--> qaz beta chi', ' naz psi phi', ' mu_is_%s' % NUNAME])