File: test_interface.py

package info (click to toggle)
python-funcy 2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 536 kB
  • sloc: python: 2,989; makefile: 140; javascript: 96; sh: 6
file content (10 lines) | stat: -rw-r--r-- 543 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
import funcy


def test_docs():
    exports = [(name, getattr(funcy, name)) for name in funcy.__all__
                if name not in ('print_errors', 'print_durations', 'ErrorRateExceeded')
                    and getattr(funcy, name).__module__ not in ('funcy.types', 'funcy.primitives')]
    # NOTE: we are testing this way and not with all() to immediately get a list of offenders
    assert [name for name, f in exports if f.__name__ in ('<lambda>', '_decorator')] == []
    assert [name for name, f in exports if f.__doc__ is None] == []