[py-svn] r33769 - in py/dist/py: documentation test test/rsession test/rsession/webdata
fijal at codespeak.net
fijal at codespeak.net
Thu Oct 26 14:48:51 CEST 2006
Author: fijal
Date: Thu Oct 26 14:48:45 2006
New Revision: 33769
Modified:
py/dist/py/documentation/test.txt
py/dist/py/test/defaultconftest.py
py/dist/py/test/rsession/rsession.py
py/dist/py/test/rsession/web.py
py/dist/py/test/rsession/webdata/source.js
Log:
Moved startsever from conftest to command line option, will integrate it with browser soon. Updated docs.
Modified: py/dist/py/documentation/test.txt
==============================================================================
--- py/dist/py/documentation/test.txt (original)
+++ py/dist/py/documentation/test.txt Thu Oct 26 14:48:45 2006
@@ -737,15 +737,15 @@
should be different than the default: ``$HOME/pytestcache-hostname``)
* distrsync_roots - a list of packages to copy to the remote machines.
* dist_remotepython - the remote python to run.
-* startserver - True or False - True to use the web based reporter listening
- on ``localhost:8000`` (There is no command line option for this)
Sample configuration::
disthosts = ['localhost', 'user at someserver:/tmp/somedir']
distrsync_roots = ['pypy', 'py']
dist_remotepython = 'python2.4'
- startserver = True
+
+Running server is done by ``-w`` command line option or ``--startserver``
+(the former might change at some point due to conflicts).
Development Notes
-----------------
Modified: py/dist/py/test/defaultconftest.py
==============================================================================
--- py/dist/py/test/defaultconftest.py (original)
+++ py/dist/py/test/defaultconftest.py Thu Oct 26 14:48:45 2006
@@ -65,5 +65,9 @@
Option('', '--exec',
action="store", dest="executable", default=None,
help="python executable to run the tests with. "),
+ Option('-w', '--startserver',
+ action="store_true", dest="startserver", default=False,
+ help="Start HTTP server listening on localhost for test"
+ ),
)
Modified: py/dist/py/test/rsession/rsession.py
==============================================================================
--- py/dist/py/test/rsession/rsession.py (original)
+++ py/dist/py/test/rsession/rsession.py Thu Oct 26 14:48:45 2006
@@ -346,11 +346,12 @@
getpkgdir = staticmethod(getpkgdir)
def init_reporter(self, reporter, sshhosts, reporter_class, arg=""):
- try:
- # XXX: use it like a command line option, but how?
- startserverflag = self.config.getinitialvalue("startserver")
- except:
- startserverflag = False
+ #try:
+ # # XXX: use it like a command line option, but how?
+ # startserverflag = self.config.getinitialvalue("startserver")
+ #except:
+ # startserverflag = False
+ startserverflag = self.config.option.startserver
checkfun = lambda: None
if startserverflag and reporter is None:
Modified: py/dist/py/test/rsession/web.py
==============================================================================
--- py/dist/py/test/rsession/web.py (original)
+++ py/dist/py/test/rsession/web.py Thu Oct 26 14:48:45 2006
@@ -257,12 +257,14 @@
def run_jssource(self):
js_name = py.path.local(__file__).dirpath("webdata").join("source.js")
- if IMPORTED_PYPY:
+ web_name = py.path.local(__file__).dirpath().join("webjs.py")
+ if IMPORTED_PYPY and web_name.mtime() > js_name.mtime():
from py.__.test.rsession import webjs
- javascript_source = rpython2javascript(webjs,
+ javascript_source = rpython2javascript(webjs,
FUNCTION_LIST, Options)
- #open(str(js_name), "w").write(javascript_source)
+ # XXX: This did not work for some reason, no idea why
+ open(str(js_name), "w").write(javascript_source)
self.serve_data("text/javascript", javascript_source)
else:
js_source = open(str(js_name), "r").read()
Modified: py/dist/py/test/rsession/webdata/source.js
==============================================================================
Binary files. No diff available.
More information about the pytest-commit
mailing list