-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Add support for multiple README files (#118)"
This reverts commit f101162.
- Loading branch information
Showing
10 changed files
with
15 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ def test_create_poetry(): | |
assert package.authors == ["Sébastien Eustace <[email protected]>"] | ||
assert package.license.id == "MIT" | ||
assert ( | ||
package.readmes[0].relative_to(fixtures_dir).as_posix() | ||
package.readme.relative_to(fixtures_dir).as_posix() | ||
== "sample_project/README.rst" | ||
) | ||
assert package.homepage == "https://python-poetry.org" | ||
|
@@ -185,26 +185,6 @@ def test_validate_fails(): | |
assert Factory.validate(content) == {"errors": [expected], "warnings": []} | ||
|
||
|
||
def test_validate_multiple_readme_files(): | ||
with_readme_files = TOMLFile(fixtures_dir / "with_readme_files" / "pyproject.toml") | ||
content = with_readme_files.read()["tool"]["poetry"] | ||
|
||
assert Factory.validate(content, strict=True) == {"errors": [], "warnings": []} | ||
|
||
|
||
def test_validate_fails_on_readme_files_with_unmatching_types(): | ||
with_readme_files = TOMLFile(fixtures_dir / "with_readme_files" / "pyproject.toml") | ||
content = with_readme_files.read()["tool"]["poetry"] | ||
content["readme"][0] = "README.md" | ||
|
||
assert Factory.validate(content, strict=True) == { | ||
"errors": [ | ||
"Declared README files must be of same type: found text/markdown, text/x-rst" | ||
], | ||
"warnings": [], | ||
} | ||
|
||
|
||
def test_create_poetry_fails_on_invalid_configuration(): | ||
with pytest.raises(RuntimeError) as e: | ||
Factory().create_poetry( | ||
|