Skip to content

Commit

Permalink
Updating README for doctests howto
Browse files Browse the repository at this point in the history
  • Loading branch information
chayim committed Aug 31, 2023
1 parent d5b42af commit 8dde72a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions doctests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## How to add an example

Create regular python file in the current folder with meaningful name. It makes sense prefix example files with
command category (e.g. string, set, list, hash, etc) to make navigation in the folder easier. Files ending in *.py*
Create regular python file in the current folder with meaningful name. It makes sense prefix example files with
command category (e.g. string, set, list, hash, etc) to make navigation in the folder easier. Files ending in *.py*
are automatically run by the test suite.

### Special markup
Expand All @@ -18,14 +18,15 @@ Examples are standalone python scripts, committed to the *doctests* directory. T
```bash
pip install -r requirements.txt
pip install -r dev_requirements.txt
pip install -r doctests/requirements.txt
```

Note - the CI process, runs the basic ```black``` and ```isort``` linters against the examples. Assuming
the requirements above have been installed you can run ```black yourfile.py``` and ```isort yourfile.py```
Note - the CI process, runs the basic ```black``` and ```isort``` linters against the examples. Assuming
the requirements above have been installed you can run ```black yourfile.py``` and ```isort yourfile.py```
locally to validate the linting, prior to CI.

Just include necessary assertions in the example file and run
```bash
sh doctests/run_examples.sh
```
to test all examples in the current folder.
to test all examples in the current folder.

0 comments on commit 8dde72a

Please sign in to comment.