danielgtaylor / python-betterproto

Clean, modern, Python 3.6+ code generator & library for Protobuf 3 and async gRPC
MIT License
1.56k stars 218 forks source link

Don't repeat tests #643

Open AdrienVannson opened 2 weeks ago

AdrienVannson commented 2 weeks ago

Summary

test_inputs.py used to include some mechanism to repeat tests several times. I don't see any reasons for this since serializing / deserializing messages is deterministic. This option was not used anyway: repeat always had a value of 1.

Checklist

Gobot1234 commented 2 weeks ago

I don't see a problem with leaving this in

AdrienVannson commented 2 weeks ago

I don't see any reason to repeat the test, since everything here is fully deterministic. More importantly, this feature is not used at all: the test is always executed only one single time.

Even if, one day, repeating tests is needed, there are much simpler ways to do it (see https://stackoverflow.com/questions/21764473/how-can-i-repeat-each-test-multiple-times-in-a-py-test-run )

It is not a big change, but I am trying as much as I can to simplify the current implementation of betterproto. For now, I have to say that the code is quite messy and many simple changes can become painful because of this :)

Gobot1234 commented 2 weeks ago

I'm just seeing it as a connivence thing if someone wants to check that something they've written doesn't depend on execution order or something like class level state. I'm overall though fairly neutral on this however

cetanu commented 1 week ago

my opinion: we can always add it back if we need it, and perhaps it will be improved the second time around