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

[nosetests][docs] nosetests doesn't work without segmentation #3675

Closed
SergK opened this Issue Jul 7, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@SergK
Contributor

SergK commented Jul 7, 2017

CKAN Version if known (or site URL)

ckan (2.8.0a0)

Please describe the expected behaviour

run nosetest without error

nosetests --ckan --reset-db --with-pylons=test-core.ini --nologcapture --with-coverage --cover-package=ckan --cover-package=ckanext --with-xunit --xunit-file=/home/jenkins/workspace/ckan.test/nose/junit.xml ckan ckanext

Please describe the actual behaviour

Test failed

nosetests --ckan --reset-db --with-pylons=test-core.ini --nologcapture --with-coverage --cover-package=ckan --cover-package=ckanext --with-xunit --xunit-file=/home/jenkins/workspace/ckan.test/nose/junit.xml ckan ckanext
No handlers could be found for logger "ckan.lib.uploader"
......................................./home/jenkins/workspace/ckan.test/venv/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:79: SAWarning: Usage of the 'related attribute set' operation is not currently supported within the execution stage of the flush process. Results may not be consistent.  Consider using alternative event listeners or connection-level operations instead.
  sess._flush_warning("related attribute set")
................................................................................................................................................................................................................................................................................................................................................................S.S.S.S...........................................................................................................................................................................................................................................................................SS.........S.................................S..............................................................................................................................................................................................................................................................................S...........S.............................................................S....................................................................................................................................................................................................................................................................................................................................................................................................................Error: you need to specify the user name.
....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................FFF.E.......................................................................................................................................................................................................................................................................................................................................................
======================================================================
ERROR: ckan.tests.test_common.TestCommonRequest.test_params_also_works_on_flask_request
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/workspace/ckan.test/venv/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/jenkins/workspace/ckan.test/ckan/ckan/tests/test_common.py", line 226, in test_params_also_works_on_flask_request
    assert u'a' in ckan_request.args
  File "/home/jenkins/workspace/ckan.test/venv/local/lib/python2.7/site-packages/werkzeug/local.py", line 343, in __getattr__
    return getattr(self._get_current_object(), name)
  File "/home/jenkins/workspace/ckan.test/venv/local/lib/python2.7/site-packages/paste/registry.py", line 137, in __getattr__
    return getattr(self._current_obj(), attr)
  File "/home/jenkins/workspace/ckan.test/venv/local/lib/python2.7/site-packages/webob/request.py", line 1181, in __getattr__
    raise AttributeError(attr)
AttributeError: args

======================================================================
FAIL: ckan.tests.test_common.TestCommonG.test_accessing_missing_key_raises_error_on_flask_request
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/workspace/ckan.test/venv/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/jenkins/workspace/ckan.test/ckan/ckan/tests/test_common.py", line 272, in test_accessing_missing_key_raises_error_on_flask_request
    assert_raises(AttributeError, getattr, ckan_g, u'user')
AssertionError: AttributeError not raised

======================================================================
FAIL: ckan.tests.test_common.TestCommonG.test_can_also_use_c_on_a_flask_request
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/workspace/ckan.test/venv/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/jenkins/workspace/ckan.test/ckan/ckan/tests/test_common.py", line 260, in test_can_also_use_c_on_a_flask_request
    eq_(ckan_c.user, u'example')
AssertionError: u'test.ckan.net' != u'example'

======================================================================
FAIL: ckan.tests.test_common.TestCommonG.test_flask_g_is_used_on_a_flask_request
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/workspace/ckan.test/venv/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/jenkins/workspace/ckan.test/ckan/ckan/tests/test_common.py", line 246, in test_flask_g_is_used_on_a_flask_request
    assert u'flask.g' in unicode(ckan_g)
AssertionError

Name                                                                        Stmts   Miss  Cover
-----------------------------------------------------------------------------------------------
ckan/__init__.py                                                                5      5     0%
........
........
ckanext/webpageview/plugin.py                                                  18      3    83%
-----------------------------------------------------------------------------------------------
TOTAL                                                                       21987   4096    81%
----------------------------------------------------------------------
Ran 2500 tests in 679.399s

FAILED (SKIP=11, errors=1, failures=3)

What steps can be taken to reproduce the issue?

run nosetest without --segments

Note No such issue in case of segmentation usage --segments or explicitly running ckan.tests.test_common

@SergK SergK changed the title from [nosetests][docs] nosetets doesn't work without segmentation to [nosetests][docs] nosetests doesn't work without segmentation Jul 7, 2017

@amercader amercader self-assigned this Jul 11, 2017

@e0ne

This comment has been minimized.

Show comment
Hide comment
@e0ne

e0ne Dec 26, 2017

The issue is still reproducible for me

e0ne commented Dec 26, 2017

The issue is still reproducible for me

@amercader

This comment has been minimized.

Show comment
Hide comment
@amercader

amercader Jun 15, 2018

Member

Closing this in favour of #4088 as there are more details there

Member

amercader commented Jun 15, 2018

Closing this in favour of #4088 as there are more details there

@amercader amercader closed this Jun 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment