Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9697415
D3548.id12521.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D3548.id12521.diff
View Options
diff --git a/swh/loader/package/nixguix/tests/test_nixguix.py b/swh/loader/package/nixguix/tests/test_nixguix.py
--- a/swh/loader/package/nixguix/tests/test_nixguix.py
+++ b/swh/loader/package/nixguix/tests/test_nixguix.py
@@ -11,7 +11,7 @@
from json.decoder import JSONDecodeError
from swh.storage.interface import StorageInterface
-from typing import Dict, Iterable, Optional, Tuple
+from typing import Dict, Optional, Tuple
from unittest.mock import patch
@@ -52,21 +52,21 @@
)
-def check_snapshot(
- snapshot: Snapshot,
- storage: StorageInterface,
- allowed_empty: Iterable[Tuple[TargetType, bytes]] = [
- (TargetType.REVISION, b"evaluation")
- ],
-):
- check_snapshot_full(snapshot, storage, allowed_empty)
+def check_snapshot(snapshot: Snapshot, storage: StorageInterface):
+ # The `evaluation` branch is allowed to be unresolvable. It's possible at current
+ # nixguix visit time, it is not yet visited (the git loader is in charge of its
+ # visit for now). For more details, check the
+ # swh.loader.package.nixguix.NixGuixLoader.extra_branches docstring.
+ check_snapshot_full(
+ snapshot, storage, allowed_empty=[(TargetType.REVISION, b"evaluation")]
+ )
assert isinstance(snapshot, Snapshot)
# then ensure the snapshot revisions are structurally as expected
revision_ids = []
for name, branch in snapshot.branches.items():
if name == b"evaluation":
- continue # skipping that particular branch
+ continue # skipping that particular branch (cf. previous comment)
if branch.target_type == TargetType.REVISION:
revision_ids.append(branch.target)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Aug 17, 11:41 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3226095
Attached To
D3548: test_nixguix: Simplify the nixguix specific check_snapshot function
Event Timeline
Log In to Comment