(pth: Path, fixtures)
| 144 | |
| 145 | |
| 146 | def create_del_file(pth: Path, fixtures): |
| 147 | filename = "wheel-0.34.2.tar.gz" |
| 148 | file_pth = fixtures.path(f"mirror/{filename}") |
| 149 | |
| 150 | assert os.path.exists(file_pth) |
| 151 | |
| 152 | struct = [] |
| 153 | |
| 154 | dest1 = pth / "del_file/file_location/subdirectory" / filename |
| 155 | dest1.parent.mkdir(parents=True) |
| 156 | dest2 = pth / "del_file/empty_directory" |
| 157 | dest2.mkdir(parents=True) |
| 158 | os.symlink(src=file_pth, dst=dest1) |
| 159 | struct.append(( |
| 160 | ScanLocation(dest1.parent), |
| 161 | ScanLocation(dest2), |
| 162 | { |
| 163 | "operation": "D", |
| 164 | "a_ref": filename, |
| 165 | "b_ref": None, |
| 166 | "a_size": 58330, |
| 167 | "b_size": 0 |
| 168 | } |
| 169 | )) |
| 170 | |
| 171 | struct.append(( |
| 172 | ScanLocation(dest1.parent.parent), |
| 173 | ScanLocation(dest2), |
| 174 | { |
| 175 | "operation": "D", |
| 176 | "a_ref": f"subdirectory/{filename}", |
| 177 | "b_ref": None, |
| 178 | "a_size": 58330, |
| 179 | "b_size": 0 |
| 180 | } |
| 181 | )) |
| 182 | |
| 183 | return struct |
| 184 | |
| 185 | |
| 186 | def create_similar_file(pth: Path, fixtures): |
nothing calls this directly
no test coverage detected