(self)
| 317 | |
| 318 | class ArtFileTest(BeetsTestCase): |
| 319 | def setUp(self): |
| 320 | super().setUp() |
| 321 | |
| 322 | # Make library and item. |
| 323 | self.i = item(self.lib) |
| 324 | self.i.path = self.i.destination() |
| 325 | # Make a music file. |
| 326 | util.mkdirall(self.i.path) |
| 327 | touch(self.i.path) |
| 328 | # Make an album. |
| 329 | self.ai = self.lib.add_album((self.i,)) |
| 330 | # Make an art file too. |
| 331 | art_bytes = self.lib.get_album(self.i).art_destination("something.jpg") |
| 332 | self.art = Path(os.fsdecode(art_bytes)) |
| 333 | self.art.touch() |
| 334 | self.ai.artpath = art_bytes |
| 335 | self.ai.store() |
| 336 | # Alternate destination dir. |
| 337 | self.otherdir = os.path.join(self.temp_dir, b"testotherdir") |
| 338 | |
| 339 | def test_art_deleted_when_items_deleted(self): |
| 340 | assert self.art.exists() |
nothing calls this directly
no test coverage detected