Skip to content

Commit

Permalink
rebase and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pbudzyns committed Feb 1, 2021
1 parent 270921d commit fd6587d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/test_ext_autodoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2395,7 +2395,7 @@ def test_name_mangling(app):
@pytest.mark.skipif(sys.version_info < (3, 6), reason='python 3.6+ is required.')
@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_hide_value(app):
options = {'members': True}
options = {'members': None}
actual = do_autodoc(app, 'module', 'target.hide_value', options)
assert list(actual) == [
'',
Expand Down
8 changes: 4 additions & 4 deletions tests/test_ext_autodoc_autoclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_classes(app):

@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_instance_variable(app):
options = {'members': True}
options = {'members': None}
actual = do_autodoc(app, 'class', 'target.instance_variable.Bar', options)
assert list(actual) == [
'',
Expand All @@ -77,8 +77,8 @@ def test_instance_variable(app):

@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_inherited_instance_variable(app):
options = {'members': True,
'inherited-members': True}
options = {'members': None,
'inherited-members': None}
actual = do_autodoc(app, 'class', 'target.instance_variable.Bar', options)
assert list(actual) == [
'',
Expand Down Expand Up @@ -161,7 +161,7 @@ def test_slots_attribute(app):
@pytest.mark.skipif(sys.version_info < (3, 7), reason='python 3.7+ is required.')
@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_show_inheritance_for_subclass_of_generic_type(app):
options = {'show-inheritance': True}
options = {'show-inheritance': None}
actual = do_autodoc(app, 'class', 'target.classes.Quux', options)
assert list(actual) == [
'',
Expand Down
4 changes: 2 additions & 2 deletions tests/test_ext_autodoc_automodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_empty_all(app):
options = {'members': True}
options = {'members': None}
actual = do_autodoc(app, 'module', 'target.empty_all', options)
assert list(actual) == [
'',
Expand All @@ -39,6 +39,6 @@ def test_empty_all(app):
def test_subclass_of_mocked_object(app):
sys.modules.pop('target', None) # unload target module to clear the module cache

options = {'members': True}
options = {'members': None}
actual = do_autodoc(app, 'module', 'target.need_mocks', options)
assert '.. py:class:: Inherited(*args: Any, **kwargs: Any)' in actual
2 changes: 1 addition & 1 deletion tests/test_ext_autodoc_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ def test_autodoc_default_options(app):
assert ' .. py:attribute:: EnumCls.val4' not in actual

# with :members: = True
app.config.autodoc_default_options = {'members': True}
app.config.autodoc_default_options = {'members': None}
actual = do_autodoc(app, 'class', 'target.enums.EnumCls')
assert ' .. py:attribute:: EnumCls.val1' in actual
assert ' .. py:attribute:: EnumCls.val4' not in actual
Expand Down

0 comments on commit fd6587d

Please sign in to comment.