vsoch / gridtest

grid parameters and testing for Python modules and functions
https://vsoch.github.io/gridtest/
Mozilla Public License 2.0
2 stars 1 forks source link

To think about: should "private" classes be included? #2

Closed vsoch closed 4 years ago

vsoch commented 4 years ago

Currently, if we run gridtest generate for a module, it will include "private" functions, e.g., here is for python's default requests:

$ cat requests-tests.yml 
requests:
  filename: /home/vanessa/anaconda3/lib/python3.7/site-packages/requests/sessions.py
  requests._check_cryptography:
  - args:
      cryptography_version: null
  requests.check_compatibility:
  - args:
      chardet_version: null
      urllib3_version: null
  requests.delete:
  - args:
      url: null
  requests.get:
  - args:
      params: null
      url: null
  requests.head:
  - args:
      url: null
  requests.options:
  - args:
      url: null
  requests.patch:
  - args:
      data: null
      url: null
  requests.post:
  - args:
      data: null
      json: null
      url: null
  requests.put:
  - args:
      data: null
      url: null
  requests.request:
  - args:
      method: null
      url: null
  requests.session:
  - args: {}

I think possibly private functions should be discluded by default, and only added if the user specifies to include them.

vsoch commented 4 years ago

Private classes are not included by default, unless the user specifies wanting them:

gridtest generate --include-private requests requests-tests.yaml