Пример #1
0
 def test_empty_error_context(self):
     context = StatikErrorContext()
     self.assertIsNone(context.render())
Пример #2
0
 def test_complete_error_context(self):
     context = StatikErrorContext(filename="somefilename.yml", line_no=12)
     self.assertEqual("in file \"somefilename.yml\", line 12",
                      context.render())
Пример #3
0
 def test_error_context_with_filename_only(self):
     context = StatikErrorContext(filename="somefilename.yml")
     self.assertEqual("in file \"somefilename.yml\"", context.render())
Пример #4
0
 def test_empty_error_context(self):
     context = StatikErrorContext()
     self.assertIsNone(context.render())
Пример #5
0
 def test_complete_error_context(self):
     context = StatikErrorContext(filename="somefilename.yml", line_no=12)
     self.assertEqual("in file \"somefilename.yml\", line 12", context.render())
Пример #6
0
 def test_error_context_with_filename_only(self):
     context = StatikErrorContext(filename="somefilename.yml")
     self.assertEqual("in file \"somefilename.yml\"", context.render())