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

loader: Ignore imported classes. #474

Closed

Conversation

Projects
None yet
2 participants
@mvollmer
Copy link
Contributor

commented Mar 11, 2015

This allows people to derive indirectly from test.Test and still
import the direct base class like this:

from MyUtils import MySpecialTestClass

class Test1(MySpecialTestClass):
    ...

Without this change, the loader might pick MySpecialTestClass as the
class to test instead of Test1.

loader: Ignore imported classes.
This allows people to derive indirectly from test.Test and still
import the direct base class like this:

    from MyUtils import MySpecialTestClass

    class Test1(MySpecialTestClass):
        ...

Without this change, the loader might pick MySpecialTestClass as the
class to test instead of Test1.
@clebergnu

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2015

Yes, it does make sense.

I'm not merging this right now because this loader behavior deserves a test. Let me try to come with one and add to this patch of yours.

Thanks!

@clebergnu

This comment has been minimized.

Copy link
Contributor

commented Mar 11, 2015

@mvollmer I created a derivative of our patch with a unittest. I'd normally add a new patch, but since it's a good practice to make the unittest accompany the change itself, this is now a single patch on PR #476.

Would you please take a look and comment? Thanks.

@clebergnu clebergnu closed this Mar 11, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.