mercredi 2 janvier 2019

Travis-ci: 'X' object has no attribute 'Y'

I'm trying to run a unit test in travis-ci. At one point I have a class which simplified looks like this:

class X:

    def __init__(var1):
        self.var1 = var1

    def Y():
        return True

    def call_function(function):
        output = function(self.Y, self.var1)

I then call X.call_function, which has given me no problems in the past when running the program. However, when running this in travis-ci I'm told:

'X' object has no attribute 'Y'

Does anybody know what causes this and how to fix it?

Aucun commentaire:

Enregistrer un commentaire