The PyTest Reference Formatter (PyRF) changes a string (e.g copied from PyCharm's "Copy Refrence" function) to match the pytest requirements.
Clone this repository:
git clone https://github.com/PaesslerAG/pytest-reference-formatter.git
Navigate into the repository:
cd pytest-reference-formatter
The script can handle multiple input strings seperated by a space and returns a modified list of strings.
The root directory django-sites seen at output is a variable that can be changed inside the formatter.
Input:
python formatter.py "repo.core.tests.test_account.TestCase repo2.core2.tests2.test_account2.TestCase2.test_function"
Output:
['django-sites/repo/core/tests/test_account.py::TestCase', 'django-sites/repo2/core2/tests2/test_account2.py::TestCase2::test_function']
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.