Welcome to the Linux Foundation Forum!

Lab 7: nosetests fails

Posts: 3
edited May 3 in LFS261 Class Forum

The pipeline for the vote app fails with

  1. + nosetests -v
  2. Traceback (most recent call last):
  3. File "/usr/local/bin/nosetests", line 8, in <module>
  4. sys.exit(run_exit())
  5. ^^^^^^^^^^
  6. [...]
  7. File "/usr/local/lib/python3.11/site-packages/nose/suite.py", line 106, in _set_tests
  8. if isinstance(tests, collections.Callable) and not is_suite:
  9. ^^^^^^^^^^^^^^^^^^^^
  10. AttributeError: module 'collections' has no attribute 'Callable'

Reason: nosetests is no longer maintained and incompatible with Python 3.9 or later (https://github.com/nose-devs/nose/issues/1099

The simple fix to continue the lab is to use https://pypi.org/project/pynose/ instead. However, it seems the recommended way would be to migrate the tests to pytest.

Comments

  • Posts: 1,276

    Hi @simonzn,

    Can you indicate the section name of Lab 7 that you are working on, please?

    Regards,
    Luis.

  • Posts: 3

    The Exercise; integration for the vote app fail with the error mentioned above.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training