[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Python question [was: Re: svn commit: rev 6338 - in trunk/subversion: libsvn_client tests/clients/cmdline]

From: Michael Wood <mwood_at_its.uct.ac.za>
Date: 2003-06-25 15:11:41 CEST

On Wed, Jun 25, 2003 at 12:53:37PM +0100, Philip Martin wrote:
> cmpilato@tigris.org writes:
>
> > * subversion/tests/clients/cmdline/basic_tests.py
> > (basic_mkdir_url): Add -m to the mkdir command so editors don't pop
> > up in people's faces when they run the test. :-)
>
> I've done this a couple of times now :( To prevent it happening again
> I want the test suite to override my SVN_EDITOR environment variable.
> What's the best way to do this? How about the following
>
> Index: subversion/tests/clients/cmdline/svntest/main.py
> ===================================================================
> --- subversion/tests/clients/cmdline/svntest/main.py (revision 6342)
> +++ subversion/tests/clients/cmdline/svntest/main.py (working copy)
> @@ -494,6 +494,11 @@
> global cleanup_mode
> testnum = None
>
> + # Unset these so that the user's environment doesn't affect the tests
> + os.environ['SVN_EDITOR'] = ''
> + os.environ['VISUAL'] = ''
> + os.environ['EDITOR'] = ''
> +

I think you're looking for:

del os.environ['blah']

-- 
Michael Wood <mwood@its.uct.ac.za>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 25 15:12:49 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.