コード例 #1
0
ファイル: tests.py プロジェクト: rgommers/check-manifest
 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")
コード例 #2
0
ファイル: tests.py プロジェクト: fschulze/check-manifest
 def test_info_begin_continue_end(self):
     import check_manifest
     check_manifest.VERBOSE = False
     check_manifest.info_begin("Reticulating splines...")
     check_manifest.info_continue(" nearly done...")
     check_manifest.info_continue(" almost done...")
     check_manifest.info_end(" done!")
     self.assertEqual(sys.stdout.getvalue(), "")
コード例 #3
0
ファイル: tests.py プロジェクト: fschulze/check-manifest
 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")
コード例 #4
0
ファイル: tests.py プロジェクト: waytai/check-manifest
 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")
コード例 #5
0
ファイル: tests.py プロジェクト: rgommers/check-manifest
 def test_error_verbose(self):
     import check_manifest
     check_manifest.VERBOSE = True
     check_manifest.info_begin("Computering...")
     check_manifest.error("Forgot to turn the gas off!")
     self.assertEqual(sys.stdout.getvalue(), "Computering...\n")
     self.assertEqual(sys.stderr.getvalue(),
                      "Forgot to turn the gas off!\n")
コード例 #6
0
ファイル: tests.py プロジェクト: rgommers/check-manifest
 def test_warning(self):
     import check_manifest
     check_manifest.VERBOSE = False
     check_manifest.info_begin("Computering...")
     check_manifest.warning("Forgot to turn the gas off!")
     self.assertEqual(sys.stdout.getvalue(), "")
     self.assertEqual(sys.stderr.getvalue(),
                      "Forgot to turn the gas off!\n")
コード例 #7
0
ファイル: tests.py プロジェクト: rgommers/check-manifest
 def test_info_begin_continue_end(self):
     import check_manifest
     check_manifest.VERBOSE = False
     check_manifest.info_begin("Reticulating splines...")
     check_manifest.info_continue(" nearly done...")
     check_manifest.info_continue(" almost done...")
     check_manifest.info_end(" done!")
     self.assertEqual(sys.stdout.getvalue(), "")
コード例 #8
0
ファイル: tests.py プロジェクト: fschulze/check-manifest
 def test_error(self):
     import check_manifest
     check_manifest.VERBOSE = False
     check_manifest.info_begin("Computering...")
     check_manifest.error("Forgot to turn the gas off!")
     self.assertEqual(sys.stdout.getvalue(), "")
     self.assertEqual(
         sys.stderr.getvalue(),
         "Forgot to turn the gas off!\n")
コード例 #9
0
ファイル: tests.py プロジェクト: waytai/check-manifest
 def test_info_begin_continue_end(self):
     from check_manifest import info_begin, info_continue, info_end
     info_begin("Reticulating splines...")
     info_continue(" nearly done...")
     info_continue(" almost done...")
     info_end(" done!")
     self.assertEqual(
         sys.stdout.getvalue(),
         "Reticulating splines... nearly done... almost done... done!\n")
コード例 #10
0
ファイル: tests.py プロジェクト: waytai/check-manifest
 def test_error(self):
     from check_manifest import info_begin, error
     info_begin("Computering...")
     error("Forgot to turn the gas off!")
     self.assertEqual(
         sys.stdout.getvalue(),
         "Computering...\n")
     self.assertEqual(
         sys.stderr.getvalue(),
         "Forgot to turn the gas off!\n")
コード例 #11
0
ファイル: tests.py プロジェクト: fschulze/check-manifest
 def test_warning_verbose(self):
     import check_manifest
     check_manifest.VERBOSE = True
     check_manifest.info_begin("Computering...")
     check_manifest.warning("Forgot to turn the gas off!")
     self.assertEqual(
         sys.stdout.getvalue(),
         "Computering...\n")
     self.assertEqual(
         sys.stderr.getvalue(),
         "Forgot to turn the gas off!\n")