Bug 2273607 - python-bluepyopt fails to build with pytest 8: AttributeError: 'TestNrnTrunkSomaDistanceCompLocation' object has no attribute 'sim'
Summary: python-bluepyopt fails to build with pytest 8: AttributeError: 'TestNrnTrunkS...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-bluepyopt
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 2256331
TreeView+ depends on / blocked
 
Reported: 2024-04-05 09:57 UTC by Tomáš Hrnčiar
Modified: 2024-04-10 21:36 UTC (History)
4 users (show)

Fixed In Version: python-bluepyopt-1.14.11-1.fc41
Clone Of:
Environment:
Last Closed: 2024-04-10 21:36:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2024-04-05 09:57:48 UTC
python-bluepyopt fails to build with pytest 8.


=================================== FAILURES ===================================
_________________ TestNrnSectionCompLocation.test_instantiate __________________

self = <bluepyopt.tests.test_ephys.test_locations.TestNrnSectionCompLocation object at 0x7f9fed13ee70>

    def test_instantiate(self):
        """ephys.locations.NrnSomaDistanceCompLocation: test instantiate"""
    
        # Create a little test class with a soma and two dendritic sections
        class Cell(object):
    
            """Cell class"""
            pass
        cell = Cell()
>       soma = self.sim.neuron.h.Section()
E       AttributeError: 'TestNrnSectionCompLocation' object has no attribute 'sim'

bluepyopt/tests/test_ephys/test_locations.py:68: AttributeError
_________________ TestNrnSeclistCompLocation.test_instantiate __________________

self = <bluepyopt.tests.test_ephys.test_locations.TestNrnSeclistCompLocation object at 0x7f9fed13fe00>

    def test_instantiate(self):
        """ephys.locations.NrnSeclistCompLocation: test instantiate"""
    
        # Create a little test class with a soma and two dendritic sections
        class Cell(object):
            """Cell class"""
            pass
    
        cell = Cell()
>       soma = self.sim.neuron.h.Section()
E       AttributeError: 'TestNrnSeclistCompLocation' object has no attribute 'sim'

bluepyopt/tests/test_ephys/test_locations.py:111: AttributeError
__________________ TestNrnSeclistSecLocation.test_instantiate __________________

self = <bluepyopt.tests.test_ephys.test_locations.TestNrnSeclistSecLocation object at 0x7f9fed13ecf0>

    def test_instantiate(self):
        """ephys.locations.NrnSeclistSecLocation: test instantiate"""
    
        # Create a little test class with a soma and two dendritic sections
        class Cell(object):
            """Cell class"""
            pass
    
        cell = Cell()
>       soma = self.sim.neuron.h.Section()
E       AttributeError: 'TestNrnSeclistSecLocation' object has no attribute 'sim'

bluepyopt/tests/test_ephys/test_locations.py:158: AttributeError
_______________ TestNrnSomaDistanceCompLocation.test_instantiate _______________

self = <bluepyopt.tests.test_ephys.test_locations.TestNrnSomaDistanceCompLocation object at 0x7f9fed13ddf0>

    def test_instantiate(self):
        """ephys.locations.NrnSomaDistanceCompLocation: test instantiate"""
    
        # Create a little test class with a soma and two dendritic sections
        class Cell(object):
    
            """Cell class"""
            pass
        cell = Cell()
>       soma = self.sim.neuron.h.Section()
E       AttributeError: 'TestNrnSomaDistanceCompLocation' object has no attribute 'sim'

bluepyopt/tests/test_ephys/test_locations.py:198: AttributeError
_____________ TestNrnSecSomaDistanceCompLocation.test_instantiate ______________

self = <bluepyopt.tests.test_ephys.test_locations.TestNrnSecSomaDistanceCompLocation object at 0x7f9fed13e6c0>

    def test_instantiate(self):
        """ephys.locations.NrnSomaDistanceCompLocation: test instantiate"""
    
        # Create a little test class with a soma and two dendritic sections
        class Cell(object):
    
            """Cell class"""
            pass
        cell = Cell()
>       soma = self.sim.neuron.h.Section(name="soma[0]")
E       AttributeError: 'TestNrnSecSomaDistanceCompLocation' object has no attribute 'sim'

bluepyopt/tests/test_ephys/test_locations.py:248: AttributeError
____________ TestNrnTrunkSomaDistanceCompLocation.test_instantiate _____________

self = <bluepyopt.tests.test_ephys.test_locations.TestNrnTrunkSomaDistanceCompLocation object at 0x7f9fed13f350>

    def test_instantiate(self):
        """ephys.locations.NrnSomaDistanceCompLocation: test instantiate"""
    
        # Create a little test class with a soma and two dendritic sections
        class Cell(object):
    
            """Cell class"""
            pass
        cell = Cell()
>       soma = self.sim.neuron.h.Section(name="soma[0]")
E       AttributeError: 'TestNrnTrunkSomaDistanceCompLocation' object has no attribute 'sim'

bluepyopt/tests/test_ephys/test_locations.py:303: AttributeError
=============================== warnings summary ===============================
bluepyopt/ephys/create_acc.py:341
  /builddir/build/BUILD/BluePyOpt-6679d3cba959787e253d4667d61e81628c557a55/bluepyopt/ephys/create_acc.py:341: SyntaxWarning: invalid escape sequence '\s'
    nmodl_pattern = '^\s*%s\s+((?:\w+\,\s*)*?\w+)\s*?$'  # NOQA

bluepyopt/tests/test_deapext/test_hype.py::test_hypeIndicatorExact
  /builddir/build/BUILD/BluePyOpt-6679d3cba959787e253d4667d61e81628c557a55/bluepyopt/deapext/hype.py:71: RuntimeWarning: divide by zero encountered in divide
    alpha.append(numpy.prod((k - j) / (Ps - j) / i))

bluepyopt/tests/test_deapext/test_hype.py::test_hypeIndicatorSampled
  /builddir/build/BUILD/BluePyOpt-6679d3cba959787e253d4667d61e81628c557a55/bluepyopt/deapext/hype.py:101: RuntimeWarning: divide by zero encountered in divide
    alpha.append(numpy.prod((k - j) / (nrP - j) / i))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED bluepyopt/tests/test_ephys/test_locations.py::TestNrnSectionCompLocation::test_instantiate
FAILED bluepyopt/tests/test_ephys/test_locations.py::TestNrnSeclistCompLocation::test_instantiate
FAILED bluepyopt/tests/test_ephys/test_locations.py::TestNrnSeclistSecLocation::test_instantiate
FAILED bluepyopt/tests/test_ephys/test_locations.py::TestNrnSomaDistanceCompLocation::test_instantiate
FAILED bluepyopt/tests/test_ephys/test_locations.py::TestNrnSecSomaDistanceCompLocation::test_instantiate
FAILED bluepyopt/tests/test_ephys/test_locations.py::TestNrnTrunkSomaDistanceCompLocation::test_instantiate
=========== 6 failed, 157 passed, 20 deselected, 3 warnings in 6.93s ===========

https://docs.pytest.org/en/stable/changelog.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07247811-python-bluepyopt/

For all our attempts to build python-bluepyopt with pytest 8, see:
https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/package/python-bluepyopt/

Let us know here if you have any questions.

Pytest 8 is planned to be included in Fedora 41. And this bugzilla is a
heads up before we merge new pytest into rawhide. For more info see a Fedora Change
proposal https://fedoraproject.org/wiki/Changes/Pytest_8

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Fedora Update System 2024-04-10 21:34:18 UTC
FEDORA-2024-096be03b94 (python-bluepyopt-1.14.11-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-096be03b94

Comment 2 Fedora Update System 2024-04-10 21:36:27 UTC
FEDORA-2024-096be03b94 (python-bluepyopt-1.14.11-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.