mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-14 09:22:11 -05:00
Add test for fix #4019
This commit is contained in:
1 parent
1d174a7dca
commit
d3d4d94970
1 file changed
+9
@@ -83,6 +83,15 @@ def test_import_classes(rootdir):
|
||||
with pytest.raises(InheritanceException):
|
||||
import_classes('unknown.Unknown', None)
|
||||
|
||||
# got exception InheritanceException for wrong class or module
|
||||
# not AttributeError (refs: #4019)
|
||||
with pytest.raises(InheritanceException):
|
||||
import_classes('unknown', '.')
|
||||
with pytest.raises(InheritanceException):
|
||||
import_classes('unknown.Unknown', '.')
|
||||
with pytest.raises(InheritanceException):
|
||||
import_classes('.', None)
|
||||
|
||||
# a module having no classes
|
||||
classes = import_classes('sphinx', None)
|
||||
assert classes == []
|
||||
|
||||
Reference in new issue
Block a user