anacrolix / torrent

Full-featured BitTorrent client package and utilities
Mozilla Public License 2.0
5.51k stars 622 forks source link

unify testing assert style #959

Open trim21 opened 3 months ago

trim21 commented 3 months ago

there are many testing assert style in this project. for example,"github.com/stretchr/testify/assert", "github.com/stretchr/testify/require", github.com/frankban/quicktest and bare compare.

Are you open to unify these testing asserts to github.com/stretchr/testify/require only?

anacrolix commented 3 months ago

I actually want to unify them to frankban/quicktest, it's much better. The older tests use testify.

anacrolix commented 1 week ago

There's this now, which is even better https://github.com/go-quicktest/qt.

anacrolix commented 1 week ago

I had a crack at using gofmt and sed to move over to https://github.com/go-quicktest/qt but it wasn't trivial. The require and assert APIs should be easy to port over but the qt package alias collides with existing use of github.com/frankban/quicktest so that's hard too. Easier just to upgrade as needed.

anacrolix commented 6 days ago

https://github.com/anacrolix/torrent/tree/unify-testing