Skip to content

Instantly share code, notes, and snippets.

@buhman
Last active October 3, 2015 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buhman/0e2c322d981f3152ee98 to your computer and use it in GitHub Desktop.
Save buhman/0e2c322d981f3152ee98 to your computer and use it in GitHub Desktop.
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