diff --git a/test/test_files.py b/test/test_files.py index e3e4857c9..e27e317cb 100644 --- a/test/test_files.py +++ b/test/test_files.py @@ -103,15 +103,15 @@ class MoveTest(_common.TestCase): def test_read_only_file_copied_writable(self): # Make the source file read-only. - os.chmod(self.path, 0444) + os.chmod(self.path, 0o444) try: self.i.move(copy=True) self.assertTrue(os.access(self.i.path, os.W_OK)) finally: # Make everything writable so it can be cleaned up. - os.chmod(self.path, 0777) - os.chmod(self.i.path, 0777) + os.chmod(self.path, 0o777) + os.chmod(self.i.path, 0o777) def test_move_avoids_collision_with_existing_file(self): # Make a conflicting file at the destination. @@ -354,7 +354,7 @@ class ArtFileTest(_common.TestCase): newart = os.path.join(self.libdir, 'newart.jpg') touch(newart) - os.chmod(newart, 0400) # read-only + os.chmod(newart, 0o400) # read-only try: i2 = item() @@ -370,8 +370,8 @@ class ArtFileTest(_common.TestCase): finally: # Make everything writable so it can be cleaned up. - os.chmod(newart, 0777) - os.chmod(ai.artpath, 0777) + os.chmod(newart, 0o777) + os.chmod(ai.artpath, 0o777) def test_move_last_file_moves_albumart(self): oldartpath = self.lib.albums()[0].artpath diff --git a/test/test_types_plugin.py b/test/test_types_plugin.py index 7af1a8d72..ed5a7552c 100644 --- a/test/test_types_plugin.py +++ b/test/test_types_plugin.py @@ -114,7 +114,7 @@ class TypesPluginTest(unittest.TestCase, TestHelper): self.modify(u'mydate=1999-01-01', u'artist:prince') old.load() - self.assertEqual(old['mydate'], mktime(1999, 01, 01)) + self.assertEqual(old['mydate'], mktime(1999, 1, 1)) self.modify(u'mydate=1999-12-30', u'artist:britney') new.load()