def test_info_emits_newline_when_needed_verbose(self): import check_manifest check_manifest.VERBOSE = True check_manifest.info_begin("Computering...") check_manifest.info("Forgot to turn the gas off!") self.assertEqual(sys.stdout.getvalue(), "Computering...\n" "Forgot to turn the gas off!\n")
def test_info_emits_newline_when_needed(self): import check_manifest check_manifest.VERBOSE = False check_manifest.info_begin("Computering...") check_manifest.info("Forgot to turn the gas off!") self.assertEqual( sys.stdout.getvalue(), "Forgot to turn the gas off!\n")
def test_info_emits_newline_when_needed(self): from check_manifest import info_begin, info info_begin("Computering...") info("Forgot to turn the gas off!") self.assertEqual( sys.stdout.getvalue(), "Computering...\n" "Forgot to turn the gas off!\n")
def test_info_verbose(self): import check_manifest check_manifest.VERBOSE = True check_manifest.info("Reticulating splines") self.assertEqual(sys.stdout.getvalue(), "Reticulating splines\n")
def test_info(self): from check_manifest import info info("Reticulating splines") self.assertEqual(sys.stdout.getvalue(), "Reticulating splines\n")