Skip to content

Several tests are skipped when using py.test #253

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

Closed
ramiro opened this issue Jun 5, 2014 · 0 comments
Closed

Several tests are skipped when using py.test #253

ramiro opened this issue Jun 5, 2014 · 0 comments

Comments

@ramiro
Copy link
Contributor

ramiro commented Jun 5, 2014

I was trying to add tests to #247 by modifying tests/helpers.CursorBase().

But then, when running py.test tests/test_pymssql.py they weren't discovered at all.

It was then that I realized py.test is skipping them:

SKIP [1] /path/to/lib/python2.7/site-packages/_pytest/python.py:503: class tests.test_pymssql.TestCursor with __init__ won't get collected

(I saw that SKIP message before every time I ran the full suite but ignored it until now)

Reason is that py.test skips classes that have an __init__() method. This is an intended and documented behavior.

This means there are 14 basic DB-API cursor test cases we aren't running.

I'm not sure how we could fix this while at the same time maintaining nose compatibility. Perhaps it's time we switch completely to py.test ?

@ramiro ramiro changed the title Several tests are skilled when using py.test Several tests are skipped when using py.test Jun 5, 2014
@ramiro ramiro closed this as completed in b818434 Aug 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant