call test() when run as script
diff --git a/Lib/newimp.py b/Lib/newimp.py
index 24d082d..614ce94 100755
--- a/Lib/newimp.py
+++ b/Lib/newimp.py
@@ -954,3 +954,6 @@
 	    __builtin__.__import__ = wasImport
 	else:
 	    del __builtin__.__import__
+
+if __name__ == '__main__':
+	test()