-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Class based testing #12
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
Comments
There are certainly a lot of tests that could be made cleaner with class based testing and setUp methods. |
Yes, it should, however if I run it in my local repository from the base folder (where
Not sure whats going on here, as the coverage seems to work:
|
Strange. I ran that exact command from the same directory and it worked as expected.
|
In some cases you need to enable the --exe option for it to work . That being said the following worked for me:
in the pvlib-python directory |
I use the same versions. However I'm on linux 64bit, maybe something goes wrong here. Still couldn't figure out, what the problem is, but will have time on Friday to check this. |
@bmu |
I solved my problem (The reason was, that I was trying to test pvlib on a NTFS drive on my new machine, which was mounted so that the files were executable and nosetests skippes files, that are executable!). @wholmgren: Do you think it makes sence, that I open a pull request that changes the unit tests to "real" unittests test now, or is this something for a later release? I could also create the milestones (see #11) first. |
There are definitely problems with the existing test modules that classes traditionally fix:
I'll take most (all?) of the blame for the fast and easy but unsustainable pattern. Some of the tests, particularly those that use solar position, will probably need to be made faster if the set up is executed multiple times. Do you want to remove the nose dependency for development or just clean up the copy/paste mess? I'm reluctant to support a rule along the lines of "all tests must be in classes that inherit from pandas In any case, I suggest that any test suite overhaul be done after the |
My intention to move to Pandas TestCases is not to have "nicer code" or that we use classes without a need to. Also for unexperienced programmers it may be usefull to have something like a template for testing, which could be provided by an existing test. No Problem with skipping this for now, but I think these Tests are really useful for future releases. |
That all makes sense. Good point regarding the templates too.
|
A couple of things related to the stalled conversation above... The nose documentation is now warning people that it's no longer in active development and recommends that new projects use pytest or just unittest. I've not used pytest, but it looks nice. I added a bunch of |
So feel free to close it! Am 2. Februar 2016 01:06:26 MEZ, schrieb Will Holmgren [email protected]:
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. |
thanks @bmu, closing. |
I would like to implement real nose test cases or pandas based
TestCases
Also pandas like testscripts for lokal testing would be nice (see https://github.com/pydata/pandas).
At the moment I don't know how to run the test suite locally.
The text was updated successfully, but these errors were encountered: