def test_print_that(self): """Test print_that function.""" out = self.StringIO() self.sys.stdout = out my_batch = EcoRI + SmaI + KpnI my_seq = Seq("GAATTCCCGGGATATA") # EcoRI and SmaI sites analysis = Analysis(my_batch, my_seq) analysis.print_that(None, title="My sequence\n\n", s1="Non Cutters\n\n") self.assertIn("My sequence", out.getvalue()) self.assertIn("Non Cutters", out.getvalue()) self.assertIn("2.", out.getvalue()) self.sys.stdout = self.sys.__stdout__
def test_print_that(self): """Test print_that function.""" out = self.StringIO() self.sys.stdout = out my_batch = EcoRI + SmaI + KpnI my_seq = Seq('GAATTCCCGGGATATA') # EcoRI and SmaI sites analysis = Analysis(my_batch, my_seq) analysis.print_that(None, title='My sequence\n\n', s1='Non Cutters\n\n') self.assertIn('My sequence', out.getvalue()) self.assertIn('Non Cutters', out.getvalue()) self.assertIn('2.', out.getvalue()) self.sys.stdout = self.sys.__stdout__