-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose to have access to zimscraperlib version from scrapers
- Loading branch information
Showing
3 changed files
with
15 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
ROOT_DIR = pathlib.Path(__file__).parent | ||
NAME = pathlib.Path(__file__).parent.name | ||
SCRAPER = f"{NAME} {__version__}" | ||
VERSION = __version__ | ||
CONTACT = "[email protected]" | ||
DEFAULT_USER_AGENT = f"{NAME}/{__version__} ({CONTACT})" | ||
|
||
|
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,13 @@ | ||
from zimscraperlib import constants | ||
|
||
|
||
def test_name(): | ||
assert constants.NAME | ||
|
||
|
||
def test_scraper(): | ||
assert constants.SCRAPER | ||
|
||
|
||
def test_version(): | ||
assert constants.VERSION |