refactor: use pathlib (#654)

* refactor: use pathlib

* fix size mock
This commit is contained in:
sigma67 2024-10-05 12:39:21 +02:00 • committed by GitHub
commit 77e40b7f7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 37 additions and 30 deletions

View file

@ -1,5 +1,4 @@
import json
import os
import tempfile
import time
from pathlib import Path
@ -62,7 +61,7 @@ class TestOAuth:
assert OAuthToken.is_oauth(oauth_token)
oauth_file.close()
os.unlink(oauth_filepath)
Path(oauth_file.name).unlink()
def test_oauth_tokens(self, oauth_filepath: str, yt_oauth: YTMusic):
# ensure instance initialized token