I like to keep in docstring of a Python script rna_filter.py
usage like:
Usage::
$ python rna_filter.py -r restraints.txt -s test_data/CG.pdb -v
(d:A1-A2 < 10.0 1)|(d:A2-A1 <= 10 1)
restraints [('A1', 'A2', '<', '10.0', '1'), ('A2', 'A1', '<=', '10', '1')]
is there any way to test it with pytest?
Edit: for me, this way of documenting my scripts is very convenient. For example, I know exactly what the script does, e.g. rna_filter documentation and I don't want to copy the code to pytest
. I would to test them from the docstring.