ordinals-collections
ordinals-collections copied to clipboard
test_collections.py : duplicate ID detection update
@Millhaus33 please check out this update to the test_collections.py by @spencerrichardhenry: "I modified the test like this in order to have the dupe id printed out, in case you'd like to adopt the change"
def test_uniqueness(): .... duplicates = len(all_inscription_ids) - len(set(all_inscription_ids)) if duplicates > 0: for inscription_id in set(inscriptions): if all_inscription_ids.count(inscription_id) > 1: print(f"Duplicate id: inscription_id") break assert duplicates == 0
Originally posted by @spencerrichardhenry in https://github.com/ordinals-wallet/ordinals-collections/issues/2380#issuecomment-1546702954