Commits

Antonio Cuni  committed e72ae22 Draft

start to write tests

  • Participants
  • Parent commits 7cfd8c2

Comments (0)

Files changed (1)

File code/test_magic.py

+import py
+import magic
+
+def test_rebind_globals():
+    def foo():
+        return A
+    py.test.raises(NameError, "foo()")
+    foo2 = magic.rebind_globals(foo, {'A': 42})
+    assert foo2() == 42