Skip to content

Instantly share code, notes, and snippets.

@buhman
Last active Oct 3, 2015
Embed
What would you like to do?
class Bar:
pass
import sys
import bar
sys.modules['foo'] = bar
Traceback (most recent call last):
File "testcase.py", line 4, in <module>
assert FooBar == BarBar
AssertionError
from foo.bar import Bar as FooBar
from bar.bar import Bar as BarBar
assert FooBar == BarBar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment