Giter Site home page Giter Site logo

Comments (4)

andre-merzky avatar andre-merzky commented on July 23, 2024

I reverted the way tests are invoked in sinon to what it was before I touched the setup -- but the tests failed before that as well, with the same error you will see now:

(ve)merzky@thinkie:~/saga/saga-pilot (master *$%) $ python setup.py test
running test
running egg_info
writing requirements to src/sinon.egg-info/requires.txt
writing src/sinon.egg-info/PKG-INFO
writing top-level names to src/sinon.egg-info/top_level.txt
writing dependency_links to src/sinon.egg-info/dependency_links.txt
reading manifest file 'src/sinon.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'src/sinon.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "setup.py", line 159, in <module>
    setup(**setup_args)
  File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/merzky/saga/saga-pilot/ve/local/lib/python2.7/site-packages/setuptools/command/test.py", line 138, in run
    self.with_project_on_sys_path(self.run_tests)
  File "/home/merzky/saga/saga-pilot/ve/local/lib/python2.7/site-packages/setuptools/command/test.py", line 118, in with_project_on_sys_path
    func()
  File "/home/merzky/saga/saga-pilot/ve/local/lib/python2.7/site-packages/setuptools/command/test.py", line 164, in run_tests
    testLoader = cks
  File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
    self.createTests()
  File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
    self.module)
  File "/usr/lib/python2.7/unittest/loader.py", line 128, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'tests'

I would actually like to propose to use the same mechanism we have in place for the other modules, i.e python tests/run_tests.py tests/configs/default.cfg or similar... Or was there a compelling reason to change that -- i.e. so compelling that we should change that procedure for all modules?

from radical.pilot.

oleweidner avatar oleweidner commented on July 23, 2024

python setup.py test works again.

from radical.pilot.

andre-merzky avatar andre-merzky commented on July 23, 2024

The tests still fail, with, but now with:

(ve)merzky@thinkie:~/saga/saga-pilot (master %) $ python setup.py test
running test
running egg_info
writing requirements to src/sinon.egg-info/requires.txt
writing src/sinon.egg-info/PKG-INFO
writing top-level names to src/sinon.egg-info/top_level.txt
writing dependency_links to src/sinon.egg-info/dependency_links.txt
reading manifest file 'src/sinon.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'src/sinon.egg-info/SOURCES.txt'
running build_ext
test__session_create (sinon.tests.api.test_session.Test_Session)
Tests if creating a new session works as epxected. ... ok
test__session_reconnect (sinon.tests.api.test_session.Test_Session)
Tests if reconnecting to an existing session works as epxected. ... ok
test__unitmanager_create (sinon.tests.api.test_unit_manager.TestUnitManager)
Test if unit manager creation works as expected. ... {'unit_scheduler': {'direct-submission': {'class': <class 'sinon.api.PLUGIN_CLASS'>,
                                          'description': 'makes sure that units end up on a unique pilot.',
                                          'instance': None,
                                          'name': 'direct-submission',
                                          'type': 'unit_scheduler',
                                          'version': '0.1'},
                    'round_robin': {'class': <class 'sinon.api.PLUGIN_CLASS'>,
                                    'description': 'simple scheduler, assigns CUs to pilots in round-robin fashion.',
                                    'instance': None,
                                    'name': 'round_robin',
                                    'type': 'unit_scheduler',
                                    'version': '0.1'}}}
ERROR
test__unitmanager_pilot_assoc (sinon.tests.api.test_unit_manager.TestUnitManager)
Test if unit manager <-> pilot association works as expected. ... {'unit_scheduler': {'direct-submission': {'class': <class 'sinon.api.PLUGIN_CLASS'>,
                                          'description': 'makes sure that units end up on a unique pilot.',
                                          'instance': None,
                                          'name': 'direct-submission',
                                          'type': 'unit_scheduler',
                                          'version': '0.1'},
                    'round_robin': {'class': <class 'sinon.api.PLUGIN_CLASS'>,
                                    'description': 'simple scheduler, assigns CUs to pilots in round-robin fashion.',
                                    'instance': None,
                                    'name': 'round_robin',
                                    'type': 'unit_scheduler',
                                    'version': '0.1'}}}
ERROR
test__unitmanager_reconnect (sinon.tests.api.test_unit_manager.TestUnitManager)
Test if unit manager reconnection works as expected. ... {'unit_scheduler': {'direct-submission': {'class': <class 'sinon.api.PLUGIN_CLASS'>,
                                          'description': 'makes sure that units end up on a unique pilot.',
                                          'instance': None,
                                          'name': 'direct-submission',
                                          'type': 'unit_scheduler',
                                          'version': '0.1'},
                    'round_robin': {'class': <class 'sinon.api.PLUGIN_CLASS'>,
                                    'description': 'simple scheduler, assigns CUs to pilots in round-robin fashion.',
                                    'instance': None,
                                    'name': 'round_robin',
                                    'type': 'unit_scheduler',
                                    'version': '0.1'}}}
ERROR
test__pilotmanager_create (sinon.tests.api.test_pilot_manager.Test_PilotManager)
Test if pilot manager creation works as expected. ... ok
test__pilotmanager_get_pilots (sinon.tests.api.test_pilot_manager.Test_PilotManager) ... ok
test__pilotmanager_list_pilots (sinon.tests.api.test_pilot_manager.Test_PilotManager)
Test if listing pilots works as expected. ... ok
test__pilotmanager_list_pilots_after_reconnect (sinon.tests.api.test_pilot_manager.Test_PilotManager)
Test if listing pilots after a reconnect works as expected. ... ERROR
test__pilotmanager_reconnect (sinon.tests.api.test_pilot_manager.Test_PilotManager)
Test if pilot manager re-connect works as expected. ... ERROR

======================================================================
ERROR: test__unitmanager_create (sinon.tests.api.test_unit_manager.TestUnitManager)
Test if unit manager creation works as expected.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/merzky/saga/saga-pilot/src/sinon/tests/api/test_unit_manager.py", line 49, in test__unitmanager_create
    um1 = sinon.UnitManager(session=session)
  File "/home/merzky/saga/saga-pilot/src/sinon/api/unit_manager.py", line 112, in __init__
    self._scheduler = pm.load('unit_scheduler', scheduler)
  File "/home/merzky/saga/saga-pilot/ve/local/lib/python2.7/site-packages/radical/utils/plugin_manager.py", line 257, in load
    raise LookupError ("No such plugin named %s" % pname)
LookupError: No such plugin named None

======================================================================
ERROR: test__unitmanager_pilot_assoc (sinon.tests.api.test_unit_manager.TestUnitManager)
Test if unit manager <-> pilot association works as expected.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/merzky/saga/saga-pilot/src/sinon/tests/api/test_unit_manager.py", line 85, in test__unitmanager_pilot_assoc
    um = sinon.UnitManager(session=session)
  File "/home/merzky/saga/saga-pilot/src/sinon/api/unit_manager.py", line 112, in __init__
    self._scheduler = pm.load('unit_scheduler', scheduler)
  File "/home/merzky/saga/saga-pilot/ve/local/lib/python2.7/site-packages/radical/utils/plugin_manager.py", line 257, in load
    raise LookupError ("No such plugin named %s" % pname)
LookupError: No such plugin named None

======================================================================
ERROR: test__unitmanager_reconnect (sinon.tests.api.test_unit_manager.TestUnitManager)
Test if unit manager reconnection works as expected.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/merzky/saga/saga-pilot/src/sinon/tests/api/test_unit_manager.py", line 62, in test__unitmanager_reconnect
    um = sinon.UnitManager(session=session)
  File "/home/merzky/saga/saga-pilot/src/sinon/api/unit_manager.py", line 112, in __init__
    self._scheduler = pm.load('unit_scheduler', scheduler)
  File "/home/merzky/saga/saga-pilot/ve/local/lib/python2.7/site-packages/radical/utils/plugin_manager.py", line 257, in load
    raise LookupError ("No such plugin named %s" % pname)
LookupError: No such plugin named None

======================================================================
ERROR: test__pilotmanager_list_pilots_after_reconnect (sinon.tests.api.test_pilot_manager.Test_PilotManager)
Test if listing pilots after a reconnect works as expected.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/merzky/saga/saga-pilot/src/sinon/tests/api/test_pilot_manager.py", line 116, in test__pilotmanager_list_pilots_after_reconnect
    pm1_r = sinon.PilotManager.get(session=session, pilot_manager_uid=pm1.uid)
TypeError: get() got an unexpected keyword argument 'pilot_manager_uid'

======================================================================
ERROR: test__pilotmanager_reconnect (sinon.tests.api.test_pilot_manager.Test_PilotManager)
Test if pilot manager re-connect works as expected.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/merzky/saga/saga-pilot/src/sinon/tests/api/test_pilot_manager.py", line 65, in test__pilotmanager_reconnect
    pm_r = sinon.PilotManager.get(session=session, pilot_manager_uid=pm.uid)
TypeError: get() got an unexpected keyword argument 'pilot_manager_uid'

----------------------------------------------------------------------
Ran 10 tests in 52.402s

FAILED (errors=5)

This is on a new virtualenv, on the master branch.

from radical.pilot.

oleweidner avatar oleweidner commented on July 23, 2024

This should be fixed in 54fbd55

from radical.pilot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.