Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classify - Fix dsl tests #334

Merged
merged 2 commits into from Oct 5, 2023

Conversation

lucasrcezimbra
Copy link
Contributor

@lucasrcezimbra lucasrcezimbra commented Oct 5, 2023

Related to #333

@lucasrcezimbra lucasrcezimbra changed the title Fix dsl tests Classify - Fix dsl tests Oct 5, 2023
@yaythomas
Copy link
Member

awesome, thank you so much!

@yaythomas
Copy link
Member

also thanks for adding test_from_step_definition - it's currently failing because, I suspect, we don't have a custom __eq__ override on the dsl classes. When I cache objects, I generally declare the classes with __slots__ and with an eq like this:

    def __eq__(self, other):
        """Equality comparison checks Pipeline and info objects are equal."""
        type_self = type(self)

        if type_self is type(other):
            all_slots = [p for c in type_self.__mro__ for p in getattr(
                c, '__slots__', [])]
            return all(
                getattr(self, s, id(self)) == getattr(other, s, id(other))
                for s in all_slots)
        else:
            return False

I'll get on it shortly!

@yaythomas yaythomas merged commit 2b36b75 into pypyr:classify Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants