Skip to content

Commit

Permalink
Correct tests handling paths to files where paths to directories are …
Browse files Browse the repository at this point in the history
…expected (#8947)

... and use existing in place of missing fixture in empty repositories key test
  • Loading branch information
Cypher1 committed Feb 7, 2024
1 parent f3bb139 commit 3e98fd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/console/commands/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def test_display_empty_repositories_setting(
) -> None:
tester = command_tester_factory(
"config",
poetry=Factory().create_poetry(fixture_dir("with_empty_repositories_key")),
poetry=Factory().create_poetry(fixture_dir("with_local_config")),
)
tester.execute("repositories")

Expand Down
4 changes: 2 additions & 2 deletions tests/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def test_create_poetry_fails_on_invalid_configuration(
fixture_dir: FixtureDirGetter,
) -> None:
with pytest.raises(RuntimeError) as e:
Factory().create_poetry(fixture_dir("invalid_pyproject") / "pyproject.toml")
Factory().create_poetry(fixture_dir("invalid_pyproject"))

fastjsonschema_error = "data must contain ['description'] properties"
custom_error = "The fields ['description'] are required in package mode."
Expand All @@ -541,7 +541,7 @@ def test_create_poetry_fails_on_nameless_project(
fixture_dir: FixtureDirGetter,
) -> None:
with pytest.raises(RuntimeError) as e:
Factory().create_poetry(fixture_dir("nameless_pyproject") / "pyproject.toml")
Factory().create_poetry(fixture_dir("nameless_pyproject"))

fastjsonschema_error = "data must contain ['name'] properties"
custom_error = "The fields ['name'] are required in package mode."
Expand Down

0 comments on commit 3e98fd8

Please sign in to comment.