Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P978
(An Untitled Masterwork)
Active
Public
Actions
Authored by
douardda
on Mar 18 2021, 6:43 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
def test_provenance_revision_add(provenance, swh_storage_with_objects, archive_pg):
"""Test the ProvenanceDB.revision_add() method"""
for revision in TEST_OBJECTS["revision"]:
entry = RevisionEntry(
archive_pg,
id=revision.id,
date=ts2dt(revision.date),
root=revision.directory,
parents=revision.parents,
)
revision_add(provenance, archive_pg, entry)
# there should be only one 'location' for the empty path
provenance.cursor.execute("SELECT count(*) FROM location WHERE path=''")
> assert provenance.cursor.fetchone()[0] == 1
E assert 0 == 1
swh/provenance/tests/test_provenance_db.py:58: AssertionError
Event Timeline
douardda
created this paste.
Mar 18 2021, 6:43 PM
2021-03-18 18:43:03 (UTC+1)
Log In to Comment