Skip to content

Observed AttributeError: 'Tests' object has no attribute 't' again as issue #3869 #5193

Closed
@vipkum2

Description

@vipkum2
class Tests(object):
    @classmethod
    @pytest.fixture(scope='module', autouse=True)
    def getTestFixture(self, request):
        self.fixtureIp   = request.config.getoption('--fixtureIp')

        # Connect to the NE
        self.t = OpenRoadmTest(self.fixtureIp)


    def test00_getStartingConfig(self):
        print(self.t)

After executing the same observed:

    def test00_getStartingConfig(self):
>       print(self.t)
E       AttributeError: 'Tests' object has no attribute 't'

testWNode_spdr.py:58: AttributeError

Same was working with pytest 3.0.4, python 3.6.3. But now I have upgraded to pytest 4.4.1 and python 3.6.5. I have raised a same issue #3869 but solution written in issue is not working here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questiongeneral question, might be closed after 2 weeks of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions