Skip to content

TST: Add inherited method #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 20, 2020
Merged

TST: Add inherited method #260

merged 5 commits into from
Apr 20, 2020

Conversation

larsoner
Copy link
Collaborator

A number of mostly small tweaks:

  1. Fixes a minor typo
  2. Adds an inherited method in test_full.py that hopefully will show (or be easily modified to show) the bug in BUG: Defer to autodoc for signatures  #221 with $self
  3. Cleans up warnings in pytest
  4. Fixes a bare except
  5. Cleans up warnings in tinybuild
  6. Runs tinybuild with warnings-as-errors

Should make things hopefully more robust. Might take a few iterations to get right depending on which Sphinx versions we support (I'll let the CIs tell me).

@larsoner
Copy link
Collaborator Author

@jnothman @rgommers this one should be ready to go, and should help with #221

@jnothman
Copy link
Member

Is the idea that in the other pr this test should fall due to $self appearing?

@larsoner
Copy link
Collaborator Author

Yes, ideally. In your link it shows up in the HTML like:

<em class="sig-param">$self</em>

so I think it should work.

@larsoner
Copy link
Collaborator Author

... and if when I rebased #221 and cherry-picked my two commits here, it didn't work :)

So I actually simplified the code further and now it does work. No $self here, but there is a $self after rebasing #221 on this:

        # ensure that no autodoc weirdness ($) occurs
>       assert '$self' not in html
E       assert '$self' not in '\n<!DOCTYPE...dy>\n</html>'
E         '$self' is contained here:
E           ig-param">$self</em>, <em class="sig-param">/</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#numpydoc_test_module.MyClass.__init__" title="Permalink to this definition">¶</a></dt>

@larsoner
Copy link
Collaborator Author

Okay since things are green let's get this in to keep things moving. Happy to make additional changes or roll things back if others look and see problems...

@larsoner larsoner merged commit b4c5fd1 into numpy:master Apr 20, 2020
@larsoner larsoner deleted the inherited branch April 20, 2020 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants