Hello

Can I suggest a feature to discuss and hopefully develop and send a PR. I
think having a *fail* keyword for unit testing would be great. So we write
a test as follows which will fail to begin with.

class MyTest(unittest.TestCase):
   def test_this_and_that(self):
      """
      Given inputs
      When action is done
      Then it should pass
      """
      fail

This keyword is to fill an empty function block like *pass* but this will
make the function raise an exception that test is failing. I know there is
*raise* but I feel this *fail* keyword is needed to write a test first
which fails and then write code and then come back to the test and fill its
body.

Umair

--
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/QPOVO34K63CLEY66GSY5JOLWBRG5QRUM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to