Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tests/cli/dep/show/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_project_only(hatch, helpers, temp_dir, config_file):
assert result.exit_code == 0, result.output
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Project
Project
+-------------+
| Name |
+=============+
Expand Down Expand Up @@ -103,7 +103,7 @@ def test_environment_only(hatch, helpers, temp_dir, config_file):
assert result.exit_code == 0, result.output
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Env: default
Env: default
+-------------+
| Name |
+=============+
Expand Down Expand Up @@ -140,13 +140,13 @@ def test_default_both(hatch, helpers, temp_dir, config_file):
assert result.exit_code == 0, result.output
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Project
Project
+-------------+
| Name |
+=============+
| foo-bar-baz |
+-------------+
Env: default
Env: default
+-------------+
| Name |
+=============+
Expand Down Expand Up @@ -196,15 +196,15 @@ def test_optional_columns(hatch, helpers, temp_dir, config_file):
assert result.exit_code == 0, result.output
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Project
Project
+-----------------+----------+------------------------+------------+
| Name | Versions | Markers | Features |
+=================+==========+========================+============+
| bar-baz | >=1.2rc5 | | eddsa, tls |
| foo | | python_version < '3.8' | |
| python-dateutil | | | |
+-----------------+----------+------------------------+------------+
Env: default
Env: default
+---------+----------------------------------------+----------+------------------------+------------+
| Name | URL | Versions | Markers | Features |
+=========+========================================+==========+========================+============+
Expand Down Expand Up @@ -252,7 +252,7 @@ def test_plugin_dependencies_unmet(hatch, helpers, temp_dir, config_file, mock_p
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Syncing environment plugin requirements
Project
Project
+-------------+
| Name |
+=============+
Expand Down
28 changes: 14 additions & 14 deletions tests/cli/env/test_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_default(hatch, helpers, temp_dir, config_file):
assert result.exit_code == 0, result.output
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Standalone
Standalone
+---------+---------+
| Name | Type |
+=========+=========+
Expand Down Expand Up @@ -107,7 +107,7 @@ def test_single_only(hatch, helpers, temp_dir, config_file):
assert result.exit_code == 0, result.output
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Standalone
Standalone
+---------+---------+
| Name | Type |
+=========+=========+
Expand Down Expand Up @@ -145,13 +145,13 @@ def test_single_and_matrix(hatch, helpers, temp_dir, config_file):
assert result.exit_code == 0, result.output
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Standalone
Standalone
+---------+---------+
| Name | Type |
+=========+=========+
| default | virtual |
+---------+---------+
Matrices
Matrices
+------+---------+----------------+
| Name | Type | Envs |
+======+=========+================+
Expand Down Expand Up @@ -190,7 +190,7 @@ def test_default_matrix_only(hatch, helpers, temp_dir, config_file):
assert result.exit_code == 0, result.output
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Matrices
Matrices
+---------+---------+------------+
| Name | Type | Envs |
+=========+=========+============+
Expand Down Expand Up @@ -231,13 +231,13 @@ def test_all_matrix_types_with_single(hatch, helpers, temp_dir, config_file):
assert result.exit_code == 0, result.output
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Standalone
Standalone
+------+---------+
| Name | Type |
+======+=========+
| bar | virtual |
+------+---------+
Matrices
Matrices
+---------+---------+----------------+
| Name | Type | Envs |
+=========+=========+================+
Expand Down Expand Up @@ -280,7 +280,7 @@ def test_specific(hatch, helpers, temp_dir, config_file):
assert result.exit_code == 0, result.output
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Standalone
Standalone
+------+---------+
| Name | Type |
+======+=========+
Expand Down Expand Up @@ -377,7 +377,7 @@ def test_optional_columns(hatch, helpers, temp_dir, config_file):
assert result.exit_code == 0, result.output
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Standalone
Standalone
+------+---------+----------+-----------------------------+-----------------------+---------+----------------------------------------------------------------------------------------------------------+
| Name | Type | Features | Dependencies | Environment variables | Scripts | Description |
+======+=========+==========+=============================+=======================+=========+==========================================================================================================+
Expand All @@ -387,7 +387,7 @@ def test_optional_columns(hatch, helpers, temp_dir, config_file):
| | | | | | | fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia |
| | | | | | | deserunt mollit anim id est laborum. |
+------+---------+----------+-----------------------------+-----------------------+---------+----------------------------------------------------------------------------------------------------------+
Matrices
Matrices
+---------+---------+------------+----------+-----------------------------+-----------------------+---------+------------------------------------------------------------------------------------------+
| Name | Type | Envs | Features | Dependencies | Environment variables | Scripts | Description |
+=========+=========+============+==========+=============================+=======================+=========+==========================================================================================+
Expand Down Expand Up @@ -425,7 +425,7 @@ def test_context_formatting(hatch, helpers, temp_dir, config_file):
"default",
{
"matrix": [{"version": ["9000", "3.14"], "py": ["39", "310"]}],
"dependencies": ["foo @ {root:uri}/../foo"],
"dependencies": ["foo@ {root:uri}/../foo"],
},
)

Expand All @@ -445,13 +445,13 @@ def test_context_formatting(hatch, helpers, temp_dir, config_file):
assert result.exit_code == 0, result.output
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Standalone
Standalone
+------+---------+--------------+-----------------------+
| Name | Type | Dependencies | Environment variables |
+======+=========+==============+=======================+
| foo | virtual | pydantic | BAR=FOO_BAR |
+------+---------+--------------+-----------------------+
Matrices
Matrices
+---------+---------+------------+-------------------------+
| Name | Type | Envs | Dependencies |
+=========+=========+============+=========================+
Expand Down Expand Up @@ -496,7 +496,7 @@ def test_plugin_dependencies_unmet(hatch, helpers, temp_dir, config_file, mock_p
assert helpers.remove_trailing_spaces(result.output) == helpers.dedent(
"""
Syncing environment plugin requirements
Standalone
Standalone
+---------+---------+
| Name | Type |
+=========+=========+
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/python/test_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def render_table(title, rows):
table.add_row(*row)

with console.capture() as capture:
console.print(table)
console.print(table, overflow="ignore", no_wrap=True, crop=False)

return capture.get()

Expand Down