forked from openlp/openlp
PEP fixes
This commit is contained in:
parent
d801ca9b09
commit
0ee8ebb1c2
@ -13,7 +13,7 @@ class TestShutil(TestCase):
|
|||||||
|
|
||||||
def test_copy(self):
|
def test_copy(self):
|
||||||
"""
|
"""
|
||||||
Test :func:`copy`
|
Test :func:`copy`
|
||||||
"""
|
"""
|
||||||
# GIVEN: A mocked `shutil.copy` which returns a test path as a string
|
# GIVEN: A mocked `shutil.copy` which returns a test path as a string
|
||||||
with patch('openlp.core.lib.shutil.shutil.copy', return_value=os.path.join('destination', 'test', 'path')) \
|
with patch('openlp.core.lib.shutil.shutil.copy', return_value=os.path.join('destination', 'test', 'path')) \
|
||||||
@ -43,7 +43,7 @@ class TestShutil(TestCase):
|
|||||||
|
|
||||||
def test_copyfile(self):
|
def test_copyfile(self):
|
||||||
"""
|
"""
|
||||||
Test :func:`copyfile`
|
Test :func:`copyfile`
|
||||||
"""
|
"""
|
||||||
# GIVEN: A mocked :func:`shutil.copyfile` which returns a test path as a string
|
# GIVEN: A mocked :func:`shutil.copyfile` which returns a test path as a string
|
||||||
with patch('openlp.core.lib.shutil.shutil.copyfile',
|
with patch('openlp.core.lib.shutil.shutil.copyfile',
|
||||||
@ -75,7 +75,7 @@ class TestShutil(TestCase):
|
|||||||
|
|
||||||
def test_copytree(self):
|
def test_copytree(self):
|
||||||
"""
|
"""
|
||||||
Test :func:`copytree`
|
Test :func:`copytree`
|
||||||
"""
|
"""
|
||||||
# GIVEN: A mocked :func:`shutil.copytree` which returns a test path as a string
|
# GIVEN: A mocked :func:`shutil.copytree` which returns a test path as a string
|
||||||
with patch('openlp.core.lib.shutil.shutil.copytree',
|
with patch('openlp.core.lib.shutil.shutil.copytree',
|
||||||
@ -112,7 +112,7 @@ class TestShutil(TestCase):
|
|||||||
|
|
||||||
def test_rmtree(self):
|
def test_rmtree(self):
|
||||||
"""
|
"""
|
||||||
Test :func:`rmtree`
|
Test :func:`rmtree`
|
||||||
"""
|
"""
|
||||||
# GIVEN: A mocked :func:`shutil.rmtree`
|
# GIVEN: A mocked :func:`shutil.rmtree`
|
||||||
with patch('openlp.core.lib.shutil.shutil.rmtree', return_value=None) as mocked_shutil_rmtree:
|
with patch('openlp.core.lib.shutil.shutil.rmtree', return_value=None) as mocked_shutil_rmtree:
|
||||||
|
@ -39,7 +39,7 @@ class TestPresentationController(TestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.get_thumbnail_folder_patcher = \
|
self.get_thumbnail_folder_patcher = \
|
||||||
patch('openlp.plugins.presentations.lib.presentationcontroller.PresentationDocument.get_thumbnail_folder',
|
patch('openlp.plugins.presentations.lib.presentationcontroller.PresentationDocument.get_thumbnail_folder',
|
||||||
return_value=Path())
|
return_value=Path())
|
||||||
self.get_thumbnail_folder_patcher.start()
|
self.get_thumbnail_folder_patcher.start()
|
||||||
mocked_plugin = MagicMock()
|
mocked_plugin = MagicMock()
|
||||||
mocked_plugin.settings_section = 'presentations'
|
mocked_plugin.settings_section = 'presentations'
|
||||||
|
Loading…
Reference in New Issue
Block a user