ChatGPT generates `testthat` use cases from 2nd edition
mfgeary opened this issue · 2 comments
Sometimes, ChatGPT will generate testthat
use cases that use edition 2 functions rather than edition 3.
For example, ChatGPT often uses testthat::context
, which was deprecated with testthat
3e.
It might be useful to specify that ChatGPT should use testthat
3e or add a function that asks ChatGPT to convert the output of create_unit_tests
from testthat
2e to testthat
3e.
That is a great idea, I will do some tests to check if ChatGPT recognizes and differentiates between testthat 2 and 3.
Thanks!
Hi @mfgeary , I couldn't find a way of making sure that ChatGPT will now return testthat 3e unit tests.
But at least, with this PR https://github.com/jcrodriguez1989/chatgpt/pull/23/files , we tell ChatGPT to use this testthat new version.
Thank you very much for your contribution on finding this issue!