-
Couldn't load subscription status.
- Fork 300
Closed
Description
I still have difficulties running the tests. Following steps were taken:
- cloned the repo
- ran
pip install -e - ran
python runtests.py
Now I get following output (truncated)
============================================================================================================= test session starts =============================================================================================================
platform linux -- Python 3.5.1 -- py-1.4.30 -- pytest-2.7.2
django settings: example.settings.test (from ini file)
rootdir: /home/sh/coding/contributing/django-rest-framework-json-api, inifile: pytest.ini
plugins: django, factoryboy
collected 3 items / 16 errors
example/tests/test_multiple_id_mixin.py ..
example/tests/test_sideload_resources.py .
=================================================================================================================== ERRORS ====================================================================================================================
_____________________________________________________________________________________________ ERROR collecting example/tests/test_format_keys.py ______________________________________________________________________________________________
_pytest.runner:149: in __init__
???
_pytest.main:437: in _memocollect
???
_pytest.main:314: in _memoizedcall
???
_pytest.main:437: in
???
_pytest.python:482: in collect
???
_pytest.python:1750: in parsefactories
???
_pytest.python:266: in fget
???
_pytest.python:479: in _getobj
???
_pytest.main:314: in _memoizedcall
???
_pytest.python:488: in _importtestmodule
???
py._path.local:650: in pyimport
???
:969: in _find_and_load
???
:954: in _find_and_load_unlocked
???
:892: in _find_spec
???
:873: in _find_spec_legacy
???
_pytest.assertion.rewrite:137: in find_module
???
_pytest.assertion.rewrite:278: in _rewrite_test
???
_pytest.assertion.rewrite:336: in rewrite_asserts
???
_pytest.assertion.rewrite:557: in run
???
/usr/lib/python3.5/ast.py:245: in visit
return visitor(node)
_pytest.assertion.rewrite:665: in visit_Assert
???
/usr/lib/python3.5/ast.py:245: in visit
return visitor(node)
_pytest.assertion.rewrite:796: in visit_Compare
???
/usr/lib/python3.5/ast.py:245: in visit
return visitor(node)
_pytest.assertion.rewrite:700: in visit_Name
???
E TypeError: Call constructor takes either 0 or 3 positional arguments
This output repeats for every test...
Now, as a sidenote, I actually don't like having all this stuff globally on my OS, so I tried with a virtualenv too. What then happens is following error:
============================================================================================================= test session starts =============================================================================================================
platform linux -- Python 3.5.1 -- py-1.4.30 -- pytest-2.7.2
rootdir: /home/sh/coding/contributing/django-rest-framework-json-api, inifile: pytest.ini
collected 0 items / 1 errors
=================================================================================================================== ERRORS ====================================================================================================================
______________________________________________________________________________________________________________ ERROR collecting ______________________________________________________________________________________________________________
_pytest.runner:149: in __init__
???
_pytest.main:437: in _memocollect
???
_pytest.main:314: in _memoizedcall
???
_pytest.main:437: in
???
_pytest.main:594: in collect
???
_pytest.main:609: in _collect
???
py._path.common:332: in visit
???
py._path.common:378: in gen
???
py._path.common:367: in gen
???
py._path.common:368: in
???
_pytest.main:632: in _recurse
???
_pytest.main:162: in __getattr__
???
_pytest.config:692: in _getmatchingplugins
???
_pytest.config:521: in getconftestmodules
???
_pytest.config:545: in importconftest
???
E _pytest.config.ConftestImportFailure: (local('/home/sh/coding/contributing/django-rest-framework-json-api/example/tests/conftest.py'), (, ImproperlyConfigured('Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.',), ))
I'm not familiar with pytest at all. A little more guidance for running those tests would be very nice :)
Metadata
Metadata
Assignees
Labels
No labels