go-openai
go-openai copied to clipboard
Refactor/internal testing
See issue: https://github.com/sashabaranov/go-openai/issues/186
Add helpers in order to reduce boilerplate code in the tests.
To test this PR run the tests: go test ./...
.
Codecov Report
Merging #194 (bfdc083) into master (2ebb265) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #194 +/- ##
=======================================
Coverage 71.84% 71.84%
=======================================
Files 21 21
Lines 579 579
=======================================
Hits 416 416
Misses 124 124
Partials 39 39
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Excellent work, thank you so much!
QQ: do we even need to factor checks
into a subpackage? Single import of test
and calls like test.NoError(t, err, "ListEngines error")
seems like a nice API, what do you think?
Excellent work, thank you so much!
QQ: do we even need to factor
checks
into a subpackage? Single import oftest
and calls liketest.NoError(t, err, "ListEngines error")
seems like a nice API, what do you think?
Good question. I didn't want the name to be too close with the std testing
package.
But if that worry is unwarranted, I can refactor it. I'm fine either way.
Got it, makes sense!