Skip to content

Inconsistent docstrings for test_*.py files #2571

Closed

Description

@seisman

Each test file has a short docstring, but the docstrings are inconsistent. For example,

  • test_basemap.py has Tests Figure.basemap
  • test_binstats.py has Tests for binstats.
  • test_coast.py has Tests for fig.coast
  • test_colorbar.py has Tests colorbar.
  • ...

Following PEP 257:

The docstring is a phrase ending in a period. It prescribes the function or method’s effect as a command (“Do this”, “Return that”), not as a description; e.g. don’t write “Returns the pathname …”.

I think it would be better to use a standarized docstrings for all these tests, e.g.,
Test Figure.modulename for plotting modules, and Test pygmt.modulename for non-plotting modules.

Thoughts?

Activity

  1. added
    question
    maintenance
    and removed
    question
    on Jun 12, 2023
  2. added this to the 0.10.0 milestone on Jun 15, 2023
  3. added a commit that references this issue on Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenance

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions