mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add test for fix #4019
This commit is contained in:
parent
1d174a7dca
commit
d3d4d94970
@ -83,6 +83,15 @@ def test_import_classes(rootdir):
|
|||||||
with pytest.raises(InheritanceException):
|
with pytest.raises(InheritanceException):
|
||||||
import_classes('unknown.Unknown', None)
|
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
|
# a module having no classes
|
||||||
classes = import_classes('sphinx', None)
|
classes = import_classes('sphinx', None)
|
||||||
assert classes == []
|
assert classes == []
|
||||||
|
Loading…
Reference in New Issue
Block a user