Esempio n. 1
0
 def test_normalize_buffer_decolorize(self):
     """Test suite for normalize_buffer method."""
     self.assertEqual(
         qs_logger.normalize_buffer("\033[1;32;40mGreenOnWhiteBack "
                                    "\033[4;31mRedUnderscore "
                                    "\033[93mYellow"),
         "GreenOnWhiteBack RedUnderscore Yellow",
     )
 def test_normalize_buffer_converts_dict_to_string(self):
     """ Test suite for normalize_buffer method """
     self.assertEqual(qs_logger.normalize_buffer({"test": "dict"}), "{'test': 'dict'}")
 def test_normalize_buffer_converts_tuple_to_string(self):
     """ Test suite for normalize_buffer method """
     self.assertEqual(qs_logger.normalize_buffer(("test", "tuple")), "('test', 'tuple')")
 def test_normalize_buffer_carriage_return_replacing(self):
     """ Test suite for normalize_buffer method """
     self.assertEqual(qs_logger.normalize_buffer("\r\n \n\r"), "\n \n\r")
 def test_normalize_buffer_remove_hex_symbols(self):
     """ Test suite for normalize_buffer method """
     self.assertEqual(qs_logger.normalize_buffer("\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\xff"), "---")
 def test_normalize_buffer_converts_dict_to_string(self):
     """ Test suite for normalize_buffer method """
     self.assertEqual(qs_logger.normalize_buffer({"test": "dict"}), "{'test': 'dict'}")
 def test_normalize_buffer_converts_tuple_to_string(self):
     """ Test suite for normalize_buffer method """
     self.assertEqual(qs_logger.normalize_buffer(("test", "tuple")), "('test', 'tuple')")
 def test_normalize_buffer_carriage_return_replacing(self):
     """ Test suite for normalize_buffer method """
     self.assertEqual(qs_logger.normalize_buffer("\r\n \n\r"), "\n \n\r")
 def test_normalize_buffer_remove_hex_symbols(self):
     """ Test suite for normalize_buffer method """
     self.assertEqual(qs_logger.normalize_buffer("\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\xff"), "---")
 def test_normalize_buffer_decolorize(self):
     """ Test suite for normalize_buffer method """
     self.assertEqual(
         qs_logger.normalize_buffer("\033[1;32;40mGreenOnWhiteBack " "\033[4;31mRedUnderscore " "\033[93mYellow"),
         "GreenOnWhiteBack RedUnderscore Yellow",
     )