ZIm/crates/languages/src
Julian de Ruiter 5b0c15d8c4
Add pytest-based test discovery and runnables for Python (#18824)
Closes  #12080, #18649.

Screenshot:

<img width="1499" alt="image"
src="https://github.com/user-attachments/assets/2644c2fc-19cf-4d2c-a992-5c56cb22deed">

Still in progress:

1. I'd like to add configuration options for selecting a Python test
runner (either pytest or unittest) so that users can explicitly choose
which runner they'd like to use for running their tests. This preference
has to be configured as unittest-style tests can also be run by pytest,
meaning we can't rely on auto-discovery to choose the desired test
runner.
2. I'd like to add venv auto-discovery similar to the feature currently
provided by the terminal using detect_venv.
3. Unit tests.

Unfortunately I'm struggling a bit with how to add settings in the
appropriate location (e.g. Python language settings). Can anyone provide
me with some pointers and/or examples on how to either add extra
settings or to re-use the existing ones?

My rust programming level is OK-ish but I'm not very familiar with the
Zed project structure and could use some help.

I'm also open for pair programming as mentioned on the website if that
helps!

Release Notes:

- Added pytest-based test discovery and runnables for Python.
- Adds a configurable option for switching between unittest and pytest
as a test runner under Python language settings. Set "TASK_RUNNER" to
"unittest" under task settings for Python if you wish to use unittest to
run Python tasks; the default is pytest.

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-11-19 14:34:56 +01:00
..
bash Add autoclosing braces for Shell Scripts (#20278) 2024-11-06 11:05:59 -05:00
c Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206) 2024-11-04 15:36:39 -08:00
cpp Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206) 2024-11-04 15:36:39 -08:00
css Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206) 2024-11-04 15:36:39 -08:00
diff Add Diff language (#19129) 2024-10-15 16:02:12 -04:00
go Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206) 2024-11-04 15:36:39 -08:00
gomod File context for assistant panel (#9712) 2024-03-29 13:55:01 -07:00
gowork File context for assistant panel (#9712) 2024-03-29 13:55:01 -07:00
javascript Highlight ? and : in ternary expressions as operator in JavaScript, TypeScript, and TSX (#20573) 2024-11-16 13:42:10 +02:00
jsdoc Clean up whitespace (#10755) 2024-04-23 13:31:21 -04:00
json Improve file_types in default.json (#20429) 2024-11-18 19:56:45 -05:00
jsonc Improve file_types in default.json (#20429) 2024-11-18 19:56:45 -05:00
markdown Add HTML injections for markdown (#20527) 2024-11-18 20:19:24 -07:00
markdown-inline Hide Markdown-Inline language from users with a new 'hidden' flag on language configs (#17104) 2024-08-29 11:23:33 -07:00
python Add pytest-based test discovery and runnables for Python (#18824) 2024-11-19 14:34:56 +01:00
regex Improve syntax highlights (#18728) 2024-10-09 19:25:46 +02:00
rust Add inclusive range scope overrides. Don't auto-close quotes at the ends of line comments (#20206) 2024-11-04 15:36:39 -08:00
tsx Highlight ? and : in ternary expressions as operator in JavaScript, TypeScript, and TSX (#20573) 2024-11-16 13:42:10 +02:00
typescript Highlight ? and : in ternary expressions as operator in JavaScript, TypeScript, and TSX (#20573) 2024-11-16 13:42:10 +02:00
yaml Fix two auto-indent issues with Markdown and YAML (#20193) 2024-11-04 12:29:38 -08:00
bash.rs tasks: Expose captured variables to ContextProvider (#12134) 2024-05-22 19:45:43 +02:00
c.rs language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00
css.rs language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00
go.rs Use the project env when running LSPs (#20641) 2024-11-14 12:26:55 -07:00
json.rs language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00
lib.rs python: Add pylsp as the secondary language server (#20358) 2024-11-12 17:23:40 +01:00
python.rs Add pytest-based test discovery and runnables for Python (#18824) 2024-11-19 14:34:56 +01:00
rust.rs Fix Rust LSP adapter on FreeBSD (#20736) 2024-11-15 11:03:55 -07:00
tailwind.rs tailwind: Allow configuring the rootFontSize (#20500) 2024-11-11 17:13:00 +01:00
typescript.rs Fix Linux rust-analyzer downloads in Preview (#20718) 2024-11-15 11:57:54 +02:00
vtsls.rs language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00
yaml.rs language servers: Fix wrong language server name (#20428) 2024-11-11 10:18:38 +01:00