Exemple #1
0
    def test_raised_errors_without_message_gets_a_default_one(self):
        Nosepride.formatter = Fabulous()
        plugin = Nosepride()
        error = (ValueError, "", Mock(name="traceback"))
        plugin.record_error(Mock(name="Test"), error)

        self.assertIn("ValueError: ", plugin.failed_expectations)
Exemple #2
0
 def test_cycles_through_fabulous_colors(self):
     Nosepride.formatter = Fabulous()
     plugin = Nosepride()
     self.assertEquals("\x1b[38;5;154m.\x1b[0m", plugin.pride("."))
     self.assertEquals("\x1b[38;5;154m.\x1b[0m", plugin.pride("."))
     self.assertEquals("\x1b[38;5;148m.\x1b[0m", plugin.pride("."))
Exemple #3
0
 def test_cycles_through_primary_terminal_colors(self):
     Nosepride.formatter = Plain()
     plugin = Nosepride()
     self.assertEquals("\x1b[31m.\x1b[0m", plugin.pride("."))
     self.assertEquals("\x1b[32m.\x1b[0m", plugin.pride("."))
     self.assertEquals("\x1b[33m.\x1b[0m", plugin.pride("."))