def testIsEmpty(tmpdir, bidsArchive4D): datasetRoot = Path(tmpdir, "bids-archive") archive = BidsArchive(datasetRoot) assert archive is not None assert archive.isEmpty() assert not bidsArchive4D.isEmpty()
def testEmptyArchiveAppend(validBidsI, imageMetadata, tmpdir): # Create in root with no BIDS-I, then append to make non-empty archive datasetRoot = Path(tmpdir, testEmptyArchiveAppend.__name__) archive = BidsArchive(datasetRoot) archive.appendIncremental(validBidsI) assert not archive.isEmpty() assert archiveHasMetadata(archive, imageMetadata) assert appendDataMatches(archive, validBidsI) assert isValidBidsArchive(datasetRoot)