(testrepo: Repository)
| 118 | |
| 119 | |
| 120 | def test_create_blob_fromworkdir(testrepo: Repository) -> None: |
| 121 | blob_oid = testrepo.create_blob_fromworkdir('bye.txt') |
| 122 | blob = testrepo[blob_oid] |
| 123 | |
| 124 | assert isinstance(blob, pygit2.Blob) |
| 125 | assert ObjectType.BLOB == blob.type |
| 126 | |
| 127 | assert blob_oid == blob.id |
| 128 | assert utils.gen_blob_sha1(BLOB_FILE_CONTENT) == blob_oid |
| 129 | |
| 130 | assert BLOB_FILE_CONTENT == blob.data |
| 131 | assert len(BLOB_FILE_CONTENT) == blob.size |
| 132 | assert BLOB_FILE_CONTENT == blob.read_raw() |
| 133 | |
| 134 | |
| 135 | def test_create_blob_fromworkdir_aspath(testrepo: Repository) -> None: |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…