Properly serialize zero-value messages in a oneof group (#176)

Also improve test utils to make it easier to have multiple json examples.

Co-authored-by: Christopher Chambers <chris@peanutcode.com>
This commit is contained in:
nat
2021-03-15 13:52:35 +01:00
committed by GitHub
parent 2f62189346
commit 342e6559dc
13 changed files with 98 additions and 41 deletions

View File

@@ -49,9 +49,9 @@ generate = { script = "tests.generate:main", help = "Generate test cases (do
test = { cmd = "pytest --cov src", help = "Run tests" }
types = { cmd = "mypy src --ignore-missing-imports", help = "Check types with mypy" }
format = { cmd = "black . --exclude tests/output_", help = "Apply black formatting to source code" }
clean = { cmd = "rm -rf .coverage .mypy_cache .pytest_cache dist betterproto.egg-info **/__pycache__ tests/output_*", help = "Clean out generated files from the workspace" }
docs = { cmd = "sphinx-build docs docs/build", help = "Build the sphinx docs"}
bench = { shell = "asv run master^! && asv run HEAD^! && asv compare master HEAD", help = "Benchmark current commit vs. master branch"}
clean = { cmd = "rm -rf .asv .coverage .mypy_cache .pytest_cache dist betterproto.egg-info **/__pycache__ tests/output_*", help = "Clean out generated files from the workspace" }
# CI tasks
full-test = { shell = "poe generate && tox", help = "Run tests with multiple pythons" }