jmsv / ety-python

A Python module to discover the etymology of words
http://ety-python.rtfd.io
MIT License
144 stars 18 forks source link

Add CLI tests #37

Closed alxwrd closed 6 years ago

alxwrd commented 6 years ago

This adds some tests around the CLI.

I've written a decorator to wrap the CLI tests so we don't need to change anything about ety.cli() to gain access to the output.

alxwrd commented 6 years ago

:thinking: Python 2.7 failed because

Traceback (most recent call last):
  File "tests.py", line 42, in wrapper
    sys.stdout.write = output
AttributeError: 'file' object attribute 'write' is read-only

I'll revisit this later.