Hacker News new | ask | show | jobs
by bb88 520 days ago
I use MS Copilot in python and it's really good. Particularly at writing unit test cases.

Unit tests are a major win for LLMs.

1 comments

Does it understand pytest, do you happen to know by any chance?
It does indeed.

It seems to understand the way you want your unit tests written. So if you have a particular style, it's best to write one or two tests in your style, then it will use that same style when it starts writing tests.

You can do prompts like "I need unit tests for the exceptions that are raised in the SuchAndSuch.function()", and it will do it -- particularly if you have a unit test already written similar to what you'd like.