[py-dev] Problems with DOS files
'holger krekel'
hpk at trillke.net
Tue Jan 18 23:19:24 CET 2005
Hi Matthew,
On Mon, Jan 17, 2005 at 19:00 -0600, Matthew Scott wrote:
> Patrick K. O'Brien wrote:
> >>Is there
> >>anything similarly simple that can be done under windows?
> >
> >
> >Not that I'm aware of. :-(
> >
> >Take that back. Courtesy of Matthew Scott, here is a clever, two-line
> >solution (concatenate that second line if it breaks):
> >
> >pytest.bat
> >==========
> >@echo off
> >python -c "import py; from py.__impl__.test.cmdline import main; main()" %1
> >%2 %3 %4 %5 %6 %7 %8 %9
>
> Just had to do something similar with a Schevo script, so here's a new
> version that can be put into py\bin as pytest.cmd:
>
> @echo off
> python %~dp0\py.test %*
much nicer! Now if only the thing could be named "py<dot>test" :-)
Btw, i played around a bit and when i just start the plain
(unixish) 'py.test' i got a dialogue asking me for the
application i want to execute with, I chose "python" from the
menu and said yes to "always open with this application ...".
And now (after i added the 'bin' directory to the Path
environment) it just works if i type "py.test". Hum,
i guess that now all files ending with ".test" will get
executed by python so it's probably not a recommendable
solution.
Alternatively, py.test.cmd could probably be copied to some
other directory (contained in the Path env) along with
_findpy.py and other scripts and it would just work.
(or the windows script really gets a different name but
i'd like to avoid it if possible)
Hum, we are getting closer to good solutions either way
i think :-)
cheers,
holger
More information about the Pytest-dev
mailing list