summaryrefslogtreecommitdiff
path: root/paste/tests
diff options
context:
space:
mode:
authorIan Bicking <ian@ianbicking.org>2005-04-26 02:08:10 +0000
committerIan Bicking <ian@ianbicking.org>2005-04-26 02:08:10 +0000
commitf583c4dea38db829805484bf88bab754252f61e8 (patch)
tree6155edeb6f6fbfc040ce6f771be6cd4decdf5fe8 /paste/tests
parent56830e37f4c93ef6eff634dbbe456f15fdfb22ba (diff)
downloadpaste-git-f583c4dea38db829805484bf88bab754252f61e8.tar.gz
Added publish_application
Diffstat (limited to 'paste/tests')
-rw-r--r--paste/tests/test_import_string.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/paste/tests/test_import_string.py b/paste/tests/test_import_string.py
new file mode 100644
index 0000000..96526ac
--- /dev/null
+++ b/paste/tests/test_import_string.py
@@ -0,0 +1,16 @@
+from paste.util.import_string import *
+import sys
+import os
+
+def test_simple():
+ for func in eval_import, simple_import:
+ assert func('sys') is sys
+ assert func('sys.version') is sys.version
+ assert func('os.path.join') is os.path.join
+
+def test_complex():
+ assert eval_import('sys:version') is sys.version
+ assert eval_import('os:getcwd()') == os.getcwd()
+ assert (eval_import('sys:version.split()[0]') ==
+ sys.version.split()[0])
+