-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from smsearcy/7-folder-with-version-error
Correctly handle a tarball in which the root folder name does not match the Docset name.
- Loading branch information
Showing
4 changed files
with
85 additions
and
47 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
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""Test functionality in the `zeal` module.""" | ||
|
||
from zeal_feeds.zeal import Zeal | ||
from zeal_feeds.user_contrib import DocSet, DocSetAuthor | ||
|
||
|
||
def test_docset_install(data_folder, tmp_path) -> None: | ||
|
||
docset_name = "wxPython" | ||
docset_archive = "wxPython.tgz" | ||
|
||
zeal = Zeal(tmp_path) | ||
docset_tarball = data_folder / docset_archive | ||
|
||
docset_meta = DocSet( | ||
name=docset_name, | ||
author=DocSetAuthor( | ||
name="", | ||
link="", | ||
), | ||
archive=docset_archive, | ||
version="", | ||
) | ||
|
||
zeal.install_docset(docset_meta, docset_tarball) | ||
print("Directory contents:", list(tmp_path.iterdir())) | ||
assert (tmp_path / f"{docset_name}.docset").is_dir() |