(self)
| 1295 | os.chmod(path, stat.S_IRUSR | stat.S_IWUSR) |
| 1296 | |
| 1297 | def test_write_with_custom_path(self): |
| 1298 | item = self.add_item_fixture() |
| 1299 | custom_path = os.path.join(self.temp_dir, b"custom.mp3") |
| 1300 | shutil.copy(syspath(item.path), syspath(custom_path)) |
| 1301 | |
| 1302 | item["artist"] = "new artist" |
| 1303 | assert MediaFile(syspath(custom_path)).artist != "new artist" |
| 1304 | assert MediaFile(syspath(item.path)).artist != "new artist" |
| 1305 | |
| 1306 | item.write(custom_path) |
| 1307 | assert MediaFile(syspath(custom_path)).artist == "new artist" |
| 1308 | assert MediaFile(syspath(item.path)).artist != "new artist" |
| 1309 | |
| 1310 | def test_write_custom_tags(self): |
| 1311 | item = self.add_item_fixture(artist="old artist") |
nothing calls this directly
no test coverage detected