mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
Fix wrong @tempdir invocations in tests
This commit is contained in:
@@ -65,7 +65,7 @@ class ConfigBaseTests(unittest.TestCase):
|
||||
self.assertTrue(isinstance(cfg, defaults.MkDocsConfig))
|
||||
self.assertEqual(cfg.site_name, 'MkDocs Test')
|
||||
|
||||
@tempdir
|
||||
@tempdir()
|
||||
def test_load_default_file_with_yaml(self, temp_dir):
|
||||
"""Test that `mkdocs.yml` will be loaded when '--config' is not set."""
|
||||
with open(os.path.join(temp_dir, 'mkdocs.yaml'), 'w') as config_file:
|
||||
@@ -125,7 +125,7 @@ class ConfigBaseTests(unittest.TestCase):
|
||||
self.assertTrue(isinstance(cfg, defaults.MkDocsConfig))
|
||||
self.assertEqual(cfg.site_name, 'MkDocs Test')
|
||||
|
||||
@tempdir
|
||||
@tempdir()
|
||||
def test_load_missing_required(self, temp_dir):
|
||||
"""`site_name` is a required setting."""
|
||||
with open(os.path.join(temp_dir, 'mkdocs.yml'), 'w') as config_file:
|
||||
|
||||
@@ -44,7 +44,7 @@ class LocalizationTests(unittest.TestCase):
|
||||
)
|
||||
self.env.install_null_translations.assert_called_once()
|
||||
|
||||
@tempdir
|
||||
@tempdir()
|
||||
def test_translations_found(self, tdir):
|
||||
translations = mock.Mock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user