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

Re: Sparse checkouts suggestion

From: Paul Hammant <paul_at_hammant.org>
Date: Thu, 14 Sep 2017 09:29:53 -0400

>
> Yes, that one's pretty nice, but as a rule we try not to burden our
> users with dependencies outside the standard library. The script uses
> os.system, what, twice? Hardly worth replacing.
>
> On the other hand, we have wrappers around subprocess.Popen in
> subversion/tests/cmdline/svntest/main.py; you should be able to recycle
> those.
>

I wasn't suggesting any change to os.system for this script. I'm just
adding tests. I couldn't find decent examples of os.system mocking (and
stderr/out) so I did it old-school style. Mocking in Python is a mess. No
cohesive 'winning' approach/framework, and how-to information not
consolidated anywhere.

As much as I like Mockito for Java, some of those OS level things are as
ugly to mock there too -
http://adambien.blog/roller/abien/entry/testing_system_out_println_outputs

- Paul
Received on 2017-09-14 15:29:58 CEST

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.