mirror of
https://github.com/beetbox/beets.git
synced 2026-01-02 22:12:53 +01:00
Tests for mkdirall
A red herring. I thought this might be responsible for #969.
This commit is contained in:
parent
ea89cf32eb
commit
fc2c75ee9c
1 changed files with 16 additions and 0 deletions
|
|
@ -588,6 +588,22 @@ class UniquePathTest(_common.TestCase):
|
|||
self.assertEqual(path, os.path.join(self.base, 'x.3.mp3'))
|
||||
|
||||
|
||||
class MkDirAllTest(_common.TestCase):
|
||||
def test_parent_exists(self):
|
||||
path = os.path.join(self.temp_dir, 'foo', 'bar', 'baz', 'qux.mp3')
|
||||
util.mkdirall(path)
|
||||
self.assertTrue(os.path.isdir(
|
||||
os.path.join(self.temp_dir, 'foo', 'bar', 'baz')
|
||||
))
|
||||
|
||||
def test_child_does_not_exist(self):
|
||||
path = os.path.join(self.temp_dir, 'foo', 'bar', 'baz', 'qux.mp3')
|
||||
util.mkdirall(path)
|
||||
self.assertTrue(not os.path.exists(
|
||||
os.path.join(self.temp_dir, 'foo', 'bar', 'baz', 'qux.mp3')
|
||||
))
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromName(__name__)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue