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

Add test_case method to Tests #132

Closed
bradleyayers opened this issue Apr 17, 2012 · 6 comments
Closed

Add test_case method to Tests #132

bradleyayers opened this issue Apr 17, 2012 · 6 comments

Comments

@bradleyayers
Copy link
Collaborator

I'm using Attest with Django. Django supports running individual tests via manage.py test app.testcase.method. Unfortunately TestSuite is not supported (not that it would help much anyway since you can't access individual tests within a test suite). I propose adding a test_case method to match test_suite. A working implementation is (not tested across many situations):

def test_case(self):
    from unittest import TestCase
    methods = {}
    for func in self:
        methods["test_{}".format(func.__name__)] = staticmethod(func)
    return type("Tests", (TestCase, ), methods)
@SimonSapin
Copy link
Collaborator

Hi,

As we discussed in #131, Attest is kind of abandoned at the moment. Dag said he would give Github and PyPI access if anyone wants to take over the maintenance. In the meantime, I’ve been using py.test. It is similar to attest but better supported.

@bradleyayers
Copy link
Collaborator Author

I gave py.test a go and it's just not as elegant as attest so im going to have a go at continuing development on this.

@SimonSapin
Copy link
Collaborator

Do you want to take over? I can give you access for the project on PyPI (what’s your user name?) but not on Github. Contact @dag for that. But I guess you could just change the github link in the docs.

@bradleyayers
Copy link
Collaborator Author

Sure, my username on PyPI is bradley.ayers.

@SimonSapin
Copy link
Collaborator

Ok, you have admin access to http://pypi.python.org/pypi/Attest

@bradleyayers
Copy link
Collaborator Author

Thank-you!

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

2 participants