generated from jCloud/repository-template
Add tests for the PythonDocumentationGenerator class constructor type exceptions
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
from src.jcloud_docsgen.core.python import PythonDocumentationGenerator
|
||||||
|
import pytest
|
||||||
|
from src.jcloud_docsgen.utils import ExistingDirectory
|
||||||
|
|
||||||
|
@pytest.mark.parametrize('project_directory,docs_directory', [
|
||||||
|
(1, 1),
|
||||||
|
(1, None),
|
||||||
|
(42, None),
|
||||||
|
(ExistingDirectory('tests'), 1),
|
||||||
|
(ExistingDirectory('tests/'), 1),
|
||||||
|
(1, ExistingDirectory('tests/')),
|
||||||
|
(1, ExistingDirectory('tests')),
|
||||||
|
(None, ExistingDirectory('tests')),
|
||||||
|
])
|
||||||
|
def test_PythonDocumentationGenerator_type_exceptions(project_directory, docs_directory):
|
||||||
|
with pytest.raises(TypeError):
|
||||||
|
PythonDocumentationGenerator(project_directory, docs_directory)
|
||||||
Reference in New Issue
Block a user