コード例 #1
0
ファイル: cli_test.py プロジェクト: axd1967/simple-db-migrate
 def test_it_should_use_color_code_to_the_specified_color(
         self, stdout_mock):
     CLI.show_colors()
     CLI.msg("message to print", "RED")
     self.assertEqual("\x1b[31mmessage to print\x1b[0m\n",
                      stdout_mock.getvalue())
コード例 #2
0
ファイル: cli_test.py プロジェクト: axd1967/simple-db-migrate
 def test_it_should_call_print_statment_with_the_given_message_and_color_codes_when_colors_are_on(
         self, stdout_mock):
     CLI.show_colors()
     CLI.msg("message to print")
     self.assertEqual("\x1b[36mmessage to print\x1b[0m\n",
                      stdout_mock.getvalue())
コード例 #3
0
ファイル: cli_test.py プロジェクト: axd1967/simple-db-migrate
 def test_it_should_call_print_statment_with_the_given_message(
         self, stdout_mock):
     CLI.msg("message to print")
     self.assertEqual("message to print\n", stdout_mock.getvalue())
コード例 #4
0
 def test_it_should_use_color_code_to_the_specified_color(self, stdout_mock):
     CLI.show_colors()
     CLI.msg("message to print", "RED")
     self.assertEqual("\x1b[31mmessage to print\x1b[0m\n", stdout_mock.getvalue())
コード例 #5
0
 def test_it_should_call_print_statment_with_the_given_message_and_color_codes_when_colors_are_on(self, stdout_mock):
     CLI.show_colors()
     CLI.msg("message to print")
     self.assertEqual("\x1b[36mmessage to print\x1b[0m\n", stdout_mock.getvalue())
コード例 #6
0
 def test_it_should_call_print_statment_with_the_given_message(self, stdout_mock):
     CLI.msg("message to print")
     self.assertEqual("message to print\n", stdout_mock.getvalue())