{"action":"opened","issue":{"url":"https://api.github.com/repos/Scille/umongo/issues/17","repository_url":"https://api.github.com/repos/Scille/umongo","labels_url":"https://api.github.com/repos/Scille/umongo/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/Scille/umongo/issues/17/comments","events_url":"https://api.github.com/repos/Scille/umongo/issues/17/events","html_url":"https://github.com/Scille/umongo/issues/17","id":164305371,"number":17,"title":"Issues running py.test","user":{"login":"lafrech","id":1767010,"avatar_url":"https://avatars.githubusercontent.com/u/1767010?v=3","gravatar_id":"","url":"https://api.github.com/users/lafrech","html_url":"https://github.com/lafrech","followers_url":"https://api.github.com/users/lafrech/followers","following_url":"https://api.github.com/users/lafrech/following{/other_user}","gists_url":"https://api.github.com/users/lafrech/gists{/gist_id}","starred_url":"https://api.github.com/users/lafrech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lafrech/subscriptions","organizations_url":"https://api.github.com/users/lafrech/orgs","repos_url":"https://api.github.com/users/lafrech/repos","events_url":"https://api.github.com/users/lafrech/events{/privacy}","received_events_url":"https://api.github.com/users/lafrech/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-07T13:11:35Z","updated_at":"2016-07-07T13:11:35Z","closed_at":null,"body":"I'm having issues running the tests.\r\n\r\nThe docs say:\r\n\r\n```\r\n$ flake8 umongo\r\n$ py.test tests\r\n$ tox\r\n```\r\n\r\n#### Running py.test from Debian Jessie\r\n\r\nI'm using a virtualenv, but `py.test` does not call `py.test` version from the virtualenv and actually, I don't know how to let it find it. I installed Debian Jessie's packaged pytest version `python3-pytest` (v 2.6.3, while latest from pip is 2.9.2). To make sure it uses python virtualenv version, I call it like this:\r\n\r\n    python $(which py.test-3.4) tests\r\n\r\nUsing this command, I get a lot of errors related to `skipif` (see PR https://github.com/Scille/umongo/pull/16).\r\n\r\nI also have a `datetime` issue:\r\n\r\n```\r\n====================================================== test session starts ======================================================\r\nplatform linux -- Python 3.4.2 -- py-1.4.25 -- pytest-2.6.3\r\ncollected 133 items \r\n\r\ntests/test_data_proxy.py ..............\r\ntests/test_document.py ...................\r\ntests/test_fields.py .F..x......\r\ntests/test_i18n.py ...\r\ntests/test_indexes.py .....\r\ntests/test_inheritance.py ....\r\ntests/test_instance.py .........\r\ntests/test_query_mapper.py ..\r\ntests/frameworks/test_mongomock.py s\r\ntests/frameworks/test_motor_asyncio.py ssssssssssssssssssssss\r\ntests/frameworks/test_pymongo.py sssssssssssssssssssss\r\ntests/frameworks/test_txmongo.py ssssssssssssssssssssss\r\n\r\n=========================================================== FAILURES ============================================================\r\n___________________________________________________ TestFields.test_datetime ____________________________________________________\r\n\r\nself = <tests.test_fields.TestFields object at 0x7f58d52d9be0>\r\n\r\n    def test_datetime(self):\r\n    \r\n        class MySchema(EmbeddedSchema):\r\n            a = fields.DateTimeField()\r\n    \r\n        s = MySchema(strict=True)\r\n        data, _ = s.load({'a': datetime(2016, 8, 6)})\r\n        assert data['a'] == datetime(2016, 8, 6)\r\n        data, _ = s.load({'a': \"2016-08-06T00:00:00Z\"})\r\n>       assert data['a'] == datetime(2016, 8, 6)\r\nE       assert datetime.datetime(2016, 8, 6, 0, 0, tzinfo=tzutc()) == datetime.datetime(2016, 8, 6, 0, 0)\r\nE        +  where datetime.datetime(2016, 8, 6, 0, 0) = datetime(2016, 8, 6)\r\n\r\ntests/test_fields.py:98: AssertionError\r\n================================== 1 failed, 65 passed, 66 skipped, 1 xfailed in 0.67 seconds ===================================\r\n```\r\n\r\nIs Jessie's py.test supposed to be \"supported\" or should we only use latest version from pip (in which case I'd appreciate a hint as I don't know how to run it without tox)?\r\n\r\n#### Running tox and latest py.test\r\n\r\nBoth errors don't appear when running\r\n\r\n    tox -e py34-pymongo\r\n\r\nwhich I suppose uses pytest from virtualenv. So these issues may be due to py.test itself.\r\n\r\nUsing tox, I get a lot of flake8 errors (including errors in umongo's dependencies) and the report says a test xfailed, but the test that failed with Jessie's pytest passes.\r\n\r\n```\r\ntests/test_data_proxy.py ..............\r\ntests/test_document.py ...................\r\ntests/test_fields.py ....x......\r\ntests/test_i18n.py ...\r\ntests/test_indexes.py .....\r\ntests/test_inheritance.py ....\r\ntests/test_instance.py .........\r\ntests/test_query_mapper.py ..\r\ntests/frameworks/test_mongomock.py s\r\ntests/frameworks/test_motor_asyncio.py ssssssssssssssssssssss\r\ntests/frameworks/test_pymongo.py sssssssssssssssssssss\r\ntests/frameworks/test_txmongo.py ssssssssssssssssssssss\r\n```"}}
{"actor":{"display_login":"lafrech"}}