Skip to content

Commit

Permalink
lsp: Remove furo as test dependency
Browse files Browse the repository at this point in the history
Nothing against furo, but not depending on it for test cases is one
less dependency to migrate when a major version of Sphinx rolls
around.

Plus overriding the theme set in `conf.py` is a nice way to exercise
the `configOverrides` option
  • Loading branch information
alcarney committed Aug 6, 2024
1 parent a87b5af commit 0504fd4
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/esbonio/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ sphinx = ["8"]

[envs.hatch-test.overrides]
matrix.sphinx.dependencies = [
"furo",
"sphinx-design",
"myst-parser",
{ value = "sphinx>=6,<7", if = ["6"] },
Expand Down
4 changes: 4 additions & 0 deletions lib/esbonio/tests/e2e/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ async def client(lsp_client: LanguageClient, uri_for, tmp_path_factory):
workspace_uri.fs_path,
str(build_dir),
],
"configOverrides": {
"html_theme": "alabaster",
"html_theme_options": {},
},
"pythonCommand": [sys.executable],
},
},
Expand Down
4 changes: 4 additions & 0 deletions lib/esbonio/tests/e2e/test_e2e_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ async def pub_client(lsp_client: LanguageClient, uri_for, tmp_path_factory):
workspace_uri.fs_path,
str(build_dir),
],
"configOverrides": {
"html_theme": "alabaster",
"html_theme_options": {},
},
"pythonCommand": [sys.executable],
},
},
Expand Down
22 changes: 20 additions & 2 deletions lib/esbonio/tests/e2e/test_sphinx_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ async def test_get_client(
sphinx=dict(
pythonCommand=[sys.executable],
buildCommand=["sphinx-build", "-M", "dirhtml", ".", str(tmp_path)],
configOverrides={
"html_theme": "alabaster",
"html_theme_options": {},
},
),
),
),
Expand Down Expand Up @@ -182,6 +186,10 @@ async def test_get_client_with_many_uris(
sphinx=dict(
pythonCommand=[sys.executable],
buildCommand=["sphinx-build", "-M", "dirhtml", ".", str(tmp_path)],
configOverrides={
"html_theme": "alabaster",
"html_theme_options": {},
},
),
),
),
Expand Down Expand Up @@ -234,8 +242,14 @@ async def test_get_client_with_many_uris_in_many_projects(
server, manager = server_manager(
dict(
esbonio=dict(
sphinx=dict(pythonCommand=[sys.executable]),
buildCommand=["sphinx-build", "-M", "dirhtml", ".", str(tmp_path)],
sphinx=dict(
pythonCommand=[sys.executable],
buildCommand=["sphinx-build", "-M", "dirhtml", ".", str(tmp_path)],
configOverrides={
"html_theme": "alabaster",
"html_theme_options": {},
},
),
),
),
) # Ensure that the server is ready
Expand Down Expand Up @@ -286,6 +300,10 @@ async def test_updated_config(
sphinx=dict(
pythonCommand=[sys.executable],
buildCommand=["sphinx-build", "-M", "dirhtml", ".", str(tmp_path)],
configOverrides={
"html_theme": "alabaster",
"html_theme_options": {},
},
),
),
),
Expand Down

0 comments on commit 0504fd4

Please sign in to comment.