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

TST: require unittest2 for testing on Python 2.6? #8760

Closed
shoyer opened this issue Nov 9, 2014 · 6 comments · Fixed by #11988
Closed

TST: require unittest2 for testing on Python 2.6? #8760

shoyer opened this issue Nov 9, 2014 · 6 comments · Fixed by #11988
Labels
Testing pandas testing functions or related to the test suite
Milestone

Comments

@shoyer
Copy link
Member

shoyer commented Nov 9, 2014

There are some nice improvements available in the unittest module on Python 2.7 or later that aren't available on Python 2.6 without using the unittest2 library. In particular, I miss using assertRaises as a context manager and skiptest.

How about adding the module as a testing requirement on Python 2.6?

@jreback
Copy link
Contributor

jreback commented Nov 9, 2014

see pandas.util.testing

usually just

with tm.assertRaises(..):
....

@jreback
Copy link
Contributor

jreback commented Nov 9, 2014

raise nose.SkipTest(...)

@shoyer
Copy link
Member Author

shoyer commented Nov 9, 2014

Yes, we have work arounds, but they are certainly more awkward without using the standard backport. Is it that bad to add a testing dependency?

@jreback
Copy link
Contributor

jreback commented Nov 9, 2014

then we have 2 ways of doing it

if u want to fix all the occurrences and then remove it from the compat file would be ok
not sure how complicated that would be

this is a long standing issue - much of the testing infrastructure was done before the fixes existed

so can be changed but each of the work around should be fixed in their entirety to avoid even more work arounds

@jreback jreback added the Testing pandas testing functions or related to the test suite label Nov 9, 2014
@jorisvandenbossche
Copy link
Member

See also #7718, if we would drop 2.6 support, then the dependency problem is solved?
But of course, cleaning up all tests to use this is still the big work.

@jreback
Copy link
Contributor

jreback commented Nov 9, 2014

iirc all of the major projects still support 2.6
anybody dropping it yet?
we had his discussion wrt to 3.2
support was trivial and no one else has dropped (except patsy) i think
note that conda supports all except 3.2 (and that's how we r building)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants