Skip to content

Input string copied from PyCharm "copy reference" function will be changed to match pytest requirements.

License

Notifications You must be signed in to change notification settings

PaesslerAG/pytest-reference-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTest Reference Formatter (PyRF)

GitHub top language GitHub GitHub last commit GitHub repo size in bytes

The PyTest Reference Formatter (PyRF) changes a string (e.g copied from PyCharm's "Copy Refrence" function) to match the pytest requirements.

Installation

Clone this repository:

git clone https://github.com/PaesslerAG/pytest-reference-formatter.git

Navigate into the repository:

cd pytest-reference-formatter

Usage

Example

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']

Contributing

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.

License

BSD 3-Clause License, Paessler AG

About

Input string copied from PyCharm "copy reference" function will be changed to match pytest requirements.

Resources

License

Stars

Watchers

Forks

Packages

No packages published