Browse Source

tests/id3: fix some linter warnings

Fabian Peter Hammerle 4 years ago
parent
commit
cb31d7bb09
1 changed files with 6 additions and 6 deletions
  1. 6 6
      tests/tag_interface/test_id3.py

+ 6 - 6
tests/tag_interface/id3.py → tests/tag_interface/test_id3.py

@@ -9,12 +9,12 @@ from symuid._tag_interface import ID3
 
 @pytest.fixture
 def empty_id3_iface(tmpdir, tracks_dir_path):
-    p = tmpdir.join('empty.mp3').strpath
+    path = tmpdir.join('empty.mp3').strpath
     shutil.copyfile(
         src=os.path.join(tracks_dir_path, 'id3v2.4-empty.mp3'),
-        dst=p,
+        dst=path,
     )
-    return ID3(mutagen.File(p))
+    return ID3(mutagen.File(path))
 
 
 @pytest.mark.parametrize('track_name', ['id3v2.4-empty.mp3'])
@@ -45,11 +45,11 @@ def test_get_comment(tracks_dir_path, track_name, expected_comment):
 
 
 def test_set_comment(empty_id3_iface):
-    assert None == empty_id3_iface.get_comment()
+    assert empty_id3_iface.get_comment() is None
     empty_id3_iface.set_comment('latin')
-    assert 'latin' == empty_id3_iface.get_comment()
+    assert empty_id3_iface.get_comment() == 'latin'
     empty_id3_iface.set_comment('你好')
-    assert '你好' == empty_id3_iface.get_comment()
+    assert empty_id3_iface.get_comment() == '你好'
     empty_id3_iface.save()
     tags = mutagen.File(empty_id3_iface.track_path).tags
     assert len(tags) == 1