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

Cannot use py.test as the testrunner #268

Closed
Themanwithoutaplan opened this issue Mar 17, 2016 · 2 comments
Closed

Cannot use py.test as the testrunner #268

Themanwithoutaplan opened this issue Mar 17, 2016 · 2 comments

Comments

@Themanwithoutaplan
Copy link
Contributor

NB this is not an attempt to shoehorn pytest in.
I use py.test -xrf --pdb path/to/test a lot when testing. pytest normally has no problems running unittests but I've come across one faiilure:

self = <substanced.folder.tests.test_views.Test_makeob testMethod=test_it>

    def test_it(self):
        from substanced.folder.views import _makeob
        request = testing.DummyRequest()
        request.registry.content = DummyContent()
        value = _makeob(request, None, None, None)
>       self.assertEqual(value, None)
E       AssertionError: 'FILE' != None

Would be nice if this could be resolved.

@Themanwithoutaplan
Copy link
Contributor Author

Interesting. It looks like the monkey patching in Test_multi_upload_submit is not being cleaned up when pytest runs. Shouldn't the monkey patching of substanced.folder.views,_makeob be handled by setup and teardown?

@Themanwithoutaplan
Copy link
Contributor Author

Fixed by #272

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