TGKRS Util is a lightweight VSCode extension to streamline Python test development, particularly for pytest. It provides utilities to quickly run tests, inspect symbols, and copy code structures with ease.
Features
Customizable Pytest Command & Flags
Configure the test runner command and extra flags to suit your project, even for non-pytest runners.
Run Pytest Function Under Cursor
Run the nearest test function or method using pytest, in a new or existing terminal.
Copy Pytest Command
Generate and copy a pytest command based on the function or method at the cursor.
Copy Parent Function or Class
Copies the source of the nearest enclosing function/method or class.
Show Signature
Displays the signature of the function, method, or class at the cursor position.
Debug Document Symbols
Shows a structured symbol tree for the current file, highlighting which symbols contain the cursor.
Customization
You can customize the test command and flags via your VSCode settings.json: