You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-4Lines changed: 20 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -311,18 +311,34 @@ $ pip install -e .
311
311
312
312
There are two types of tests:
313
313
314
-
1.Manually-written tests for some behavior of the library
315
-
2.Proto files and JSON inputs for automated tests
314
+
1.Standard tests
315
+
2.Custom tests
316
316
317
-
For #2, you can add a new `*.proto` file into the `betterproto/tests` directory along with a sample `*.json` input and it will get automatically picked up.
317
+
#### Standard tests
318
+
319
+
Adding a standard test case is easy.
320
+
321
+
- Create a new directory `betterproto/tests/inputs/<name>`
322
+
- add `<name>.proto` with a message called `Test`
323
+
- add `<name>.json` with some test data
324
+
325
+
It will be picked up automatically when you run `pipenv test`
326
+
327
+
- See also: [Standard Tests Development Guide](betterproto\tests\standard-tests.md)
328
+
329
+
#### Custom tests
330
+
331
+
Custom tests are found in `tests/test_*.py` and are run with pytest.
0 commit comments