mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
doc update
This commit is contained in:
@ -33,18 +33,16 @@ actively welcome your pull requests:
|
||||
file.
|
||||
4. If you've added code that should be tested, add tests. All new parsers should
|
||||
have several sample outputs and tests.
|
||||
- Templates:
|
||||
- Templates:
|
||||
- [tests/templates/_test_foo.py](https://github.com/kellyjonbrazil/jc/blob/master/tests/templates/_test_foo.py) as a template for a test.
|
||||
- [tests/templates/_test_foo_s.py (streaming)](https://github.com/kellyjonbrazil/jc/tree/master/tests/templates/_test_foo_s.py) as a template for a streaming test.
|
||||
- [tests/templates/_test_foo_s.py (streaming)](https://github.com/kellyjonbrazil/jc/tree/master/tests/templates/_test_foo_s.py) as a template for a streaming test.
|
||||
- [tests/templates/_test_foo_simple.py](https://github.com/kellyjonbrazil/jc/tree/master/tests/templates/_test_foo_simple.py) as a template if you only have test with fixtures.
|
||||
Execute these steps for standard tests:
|
||||
- Save this file as `text_{parser_name}.py` since the helper methods extract parser names from the filename.
|
||||
- Organize fixtures in `text/fixtures` for optimal structure.
|
||||
- Save this file as `test_{parser_name}.py` since the helper methods extract parser names from the filename.
|
||||
- Organize fixtures in `tests/fixtures` for optimal structure.
|
||||
- Format fixtures as follows (using double dashes):
|
||||
- `{parser_name}--{some_test_description}.out` for command output.
|
||||
- `{parser_name}--{some_test_description}.json` for expected JSON after parsing.
|
||||
|
||||
|
||||
- Fixtures: Tests typically consist of an input file and an expected output
|
||||
JSON file. Add the data files to the appropriate folder under [tests/fixtures](https://github.com/kellyjonbrazil/jc/tree/master/tests/fixtures)
|
||||
5. Documentation is auto-generated from docstrings, so ensure they are clear and
|
||||
|
@ -4,7 +4,7 @@ from tests import utils_for_test as test_utils
|
||||
|
||||
# Execute these steps for standard tests:
|
||||
# - Save this file as `test_{parser_name}.py` since the helper methods extract parser names from the filename.
|
||||
# - Organize fixtures in `test/fixtures` for optimal structure.
|
||||
# - Organize fixtures in `tests/fixtures` for optimal structure.
|
||||
# - Format fixtures as follows (using double dashes):
|
||||
# - `{parser_name}--{some_test_description}.out` for command output.
|
||||
# - `{parser_name}--{some_test_description}.json` for expected JSON after parsing.
|
||||
|
Reference in New Issue
Block a user