[shpy-commit] r10133 - shpy/trunk/dist/shpy/net/test
hpk at codespeak.net
hpk at codespeak.net
Wed Mar 23 19:51:15 MET 2005
Author: hpk
Date: Wed Mar 23 19:51:14 2005
New Revision: 10133
Removed:
shpy/trunk/dist/shpy/net/test/test_all.py
Modified:
shpy/trunk/dist/shpy/net/test/test_basic.py
shpy/trunk/dist/shpy/net/test/test_structure.py
Log:
one halfway useful test passes
Deleted: /shpy/trunk/dist/shpy/net/test/test_all.py
==============================================================================
--- /shpy/trunk/dist/shpy/net/test/test_all.py Wed Mar 23 19:51:14 2005
+++ (empty file)
@@ -1,7 +0,0 @@
-from __future__ import generators
-
-import autopath
-from unittest2 import main, collect
-
-if __name__ == '__main__':
- main(collector=collect.PackageDirectoryCollector(autopath.projectdir) )
Modified: shpy/trunk/dist/shpy/net/test/test_basic.py
==============================================================================
--- shpy/trunk/dist/shpy/net/test/test_basic.py (original)
+++ shpy/trunk/dist/shpy/net/test/test_basic.py Wed Mar 23 19:51:14 2005
@@ -1,7 +1,7 @@
import autopath, os, time, sys
-from unittest2 import check, main
-from unittest2.tool import dyncode
+import py
+
from shpy.net.register import ServerGateway
from shpy.net.test import functest
@@ -15,9 +15,9 @@
try:
import popen2, atexit
except ImportError:
- raise check.Skipped()
+ raise py.test.skip()
import startserver
- pyfile = dyncode.getpyfile(startserver)
+ pyfile = startserver.__file__.rstrip('c')
proc = popen2.Popen4('python %s %s' % (pyfile, hostport))
atexit.register(os.kill, proc.pid, 15)
@@ -32,7 +32,7 @@
gw.exec_remote('gateway.exec_remote("test_1_back = 42")')
time.sleep(1)
- check.equal(gw.ns['test_1_back'], 42)
+ assert gw.ns['test_1_back'] == 42
#res = gw.call_synchronous(functest.f)
#check.equal(res, 42)
@@ -40,5 +40,3 @@
gw = getservergateway()
#gw.exec_remote(functest.callback)
-if __name__=='__main__':
- main()
Modified: shpy/trunk/dist/shpy/net/test/test_structure.py
==============================================================================
--- shpy/trunk/dist/shpy/net/test/test_structure.py (original)
+++ shpy/trunk/dist/shpy/net/test/test_structure.py Wed Mar 23 19:51:14 2005
@@ -1,17 +1,12 @@
import autopath, os, time, sys
-from unittest2 import check, main
from shpy.net import shared
-from shpy.net.structure import representeverything, getstructure
+from shpy.net.gateway import representeverything, getstructure
def test_everything():
lines = representeverything(shared.root)
shared.root.funnythings = 42
exec '\n'.join(lines)
- check.false(hasattr(shared.root, 'funnythings'))
-
-
-if __name__=='__main__':
- main()
+ assert not hasattr(shared.root, 'funnythings')
More information about the shpy-commit
mailing list