[py-dev] Problems with DOS files

'holger krekel' hpk at trillke.net
Fri Dec 3 03:32:59 CET 2004


[Patrick K. O'Brien Thu, Dec 02, 2004 at 03:40:09PM -0600]
> > Hum, i am not very used to windows anymore but i have been
> > worrying about this some time now.  What is the simplest/best way
> > to make a script like 'py.test' generally available on windows
> > from a subversion checkout?
> > 
> > Your small recipe works for your setup but obviously wouldn't
> > for other users.  Hum. On Unix you can "source" the output of
> > 'python .../py/env.py' into your current shell and you will
> > get appropriate access to the py.test script as well as
> > the appropriate directories added to PYTHONPATH.  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

Interesting.  Though this still seems to depend on 

    A) having 'py' in your PYTHONPATH 
    B) always wanting the same version of 'py' to be used by py.test 

But on Unix  the python-hashbanged script py/bin/py.test uses the
logic in 'py/bin/_findpy.py' to determine a "nearby" version
of the py lib.  This is useful when you have multiple
checkouts, say versions in the form of svn-externals, and want
to fix bugs in your local "py" version while working on some tests 
of your project at hand. (Pretty common use case with py.test if you 
ask me :-). 

So i wonder how/if we could remedy the above A) and B) 
to get an equivalent windows version. 

> > Hum, i just took another quick look at your web pages (and btw, i am still
> > interested in PyPerSyst and we did mention it in our PyPy EU proposal :-)
> 
> Matt and I may submit a presentation proposal for the next PyCon, since we
> both use Pypersyst on a daily basis.  Pypersyst has come a long, long way.
> I think it will blow people's minds once we release the new stuff we have.
> You'll never want to use any other database again, except as a backend to
> Pypersyst (well, as a backend to Schevo actually, but that's part of the
> surprise).  If the EU wants to be competitive, they should use Schevo!  ;-)

Hehe, that sounds good!  Now i only desparately need a need for a database :-) 

> Unfortunately the most recent code is no longer on SourceForge, since we
> wanted to use Subversion.  So we moved it all to a private server a while
> back.  But we'll be going public with the latest and greatest in a few
> weeks.  Keep an eye out for Schevo and Pypersyst!  :-)

Of course, you are invited to move your project to codespeak if you like. 
We have some 2 1/2 years worth of subversion experience and are 
soon to install a new setup with a 'trac' environment and a pretty 
reliable machine ... we hope :-)  
 
> > and found that you are also doing 'Py' but boy was i relieved to see your
> > actual namespace is 'wx.py' :-)
> 
> Yeah, that was just me getting the "pie" puns out of my system (PyCrust,
> PyAlaMode, etc.).  What's your excuse?  (just kidding...)

Hehe, i bite on this one. There are basically 
three reasons why it's named 'py' now: 

- I could convince Armin in a weak moment  :) 

- 'py.test' seems to make "idiomatic" sense and resembles 
  some of the ambition to make it a generally useful 
  test tool for all kinds of python projects. 

- py.<tab> should give nice completion also for any upcoming 
  scripts provided by the py lib.  

- The former 'std' seemed too broad and sounded 
  more static than 'py' wants to be.  You know, py.test and 
  its underlying library are still part of the quest for the 
  holy grail .. i hear the sound of coconuts ... 

monty-pythonic greetings, 

    holger



More information about the Pytest-dev mailing list