1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

doc update

This commit is contained in:
Kelly Brazil
2024-02-04 12:18:14 -08:00
parent 3e5d206f0c
commit 5b849b0275
2 changed files with 5 additions and 7 deletions

View File

@ -33,18 +33,16 @@ actively welcome your pull requests:
file. file.
4. If you've added code that should be tested, add tests. All new parsers should 4. If you've added code that should be tested, add tests. All new parsers should
have several sample outputs and tests. 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.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. - [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: Execute these steps for standard tests:
- Save this file as `text_{parser_name}.py` since the helper methods extract parser names from the filename. - Save this file as `test_{parser_name}.py` since the helper methods extract parser names from the filename.
- Organize fixtures in `text/fixtures` for optimal structure. - Organize fixtures in `tests/fixtures` for optimal structure.
- Format fixtures as follows (using double dashes): - Format fixtures as follows (using double dashes):
- `{parser_name}--{some_test_description}.out` for command output. - `{parser_name}--{some_test_description}.out` for command output.
- `{parser_name}--{some_test_description}.json` for expected JSON after parsing. - `{parser_name}--{some_test_description}.json` for expected JSON after parsing.
- Fixtures: Tests typically consist of an input file and an expected output - 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) 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 5. Documentation is auto-generated from docstrings, so ensure they are clear and

View File

@ -4,7 +4,7 @@ from tests import utils_for_test as test_utils
# Execute these steps for standard tests: # Execute these steps for standard tests:
# - Save this file as `test_{parser_name}.py` since the helper methods extract parser names from the filename. # - 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): # - Format fixtures as follows (using double dashes):
# - `{parser_name}--{some_test_description}.out` for command output. # - `{parser_name}--{some_test_description}.out` for command output.
# - `{parser_name}--{some_test_description}.json` for expected JSON after parsing. # - `{parser_name}--{some_test_description}.json` for expected JSON after parsing.