Skip to content
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

Automated Pint Testing #16

Closed
hgrecco opened this issue Mar 15, 2016 · 3 comments
Closed

Automated Pint Testing #16

hgrecco opened this issue Mar 15, 2016 · 3 comments
Milestone

Comments

@hgrecco
Copy link

hgrecco commented Mar 15, 2016

I have created a repository to make sure we do not break backwards compatibility unintentionally in Pint.

Take a look at https://github.com/hgrecco/pint_downstream_tester

@rkingsbury
Copy link
Member

Awesome; thanks for setting this up! Is it working? I took a peek at your travis.yml file, and on my system at least, I have to change

- python -m unittest pyEQL/tests/*

to

- python -m unittest pyEQL/tests/*.py

To get the tests to run.

@hgrecco
Copy link
Author

hgrecco commented Mar 21, 2016

It seems to work the way it is:
https://travis-ci.org/hgrecco/pint_downstream_tester/builds/116230091

But in any case, if I may suggest it, I would be nice to have a better entry point for testing. For example, in Pint we do the following:

In the test suite we have function to collect tests and run them. See here

This functions is called by a function named test in the package __init__.py See here

In this way users can just run:

>>> from pint import test
>>> test()

The final piece of the puzzle is a line in setup.py. See here
which allows users to run in the console

python setup.py test

Of course, not all this is necessary. But is nice to have at least a part of it to make it easier for end users to run tests (and for crazy people like me having this kind of integrated testing!).

@rkingsbury
Copy link
Member

As a matter of fact a better entry point for testing has been on my "to-do" list, I just haven't had time to research a better way to set it up. Looks like you've given me the solution I was looking for; thank you! I'll implement this before the next release.

@rkingsbury rkingsbury added this to the pyEQL 0.4 milestone Mar 23, 2016
rkingsbury pushed a commit that referenced this issue Mar 30, 2016
Provide infrastructure to run all automated tests by calling either

python setup.py test

or

pyEQL.test()

Thanks to Hernan Grecco for the suggestion and example code from the
pint project. Closes #16.
@rkingsbury rkingsbury reopened this Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants