-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wrote test is valid bag, wrote function is valid bag
- Loading branch information
Showing
2 changed files
with
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import pathlib | ||
import bagit | ||
|
||
def is_valid_bag(source: pathlib.Path) -> bool: | ||
bag = bagit.Bag(str(source)) | ||
return bag.validate() |
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,11 @@ | ||
import bd_validator as bv | ||
import pytest | ||
from pathlib import Path | ||
|
||
@pytest.fixture | ||
def good_package(): | ||
return Path("fixtures/simple_video_pk") | ||
|
||
def test_is_package_bag(good_package): | ||
result = bv.is_valid_bag(good_package) | ||
assert result is True |