HEADS UP: cmdline test factory
From: Neels Janosch Hofmeyr <neels_at_elego.de>
Date: Sun, 21 Jun 2009 00:59:20 +0200
Hi all,
don't worry, this is just a new feature. It might save you quite some time,
I recently added subversion/cmdline/svntest/factory.py, which can write a
Mike's test, in essence, does this:
In cmdline test lingo, he wrote this instead:
sbox.build()
# lock a file as wc_author
svntest.main.file_append(file_path, "This represents a binary file\n")
What if I told you that he could just have written the simple and short
Well, I'm telling you, now :)
This is how I implemented the same test cmpilato wrote in about two minutes
[[[
I ran that test (called "mine" for educational purposes :P) and factory spat
[[[
iota = os.path.join(wc_dir, 'iota')
# echo "This represents a binary file\n" >> iota
# svn ci
expected_status = actions.get_virginal_state(wc_dir, 1)
actions.run_and_verify_commit(wc_dir, expected_output, expected_status,
# svn lock -m 'lock & load' iota
actions.run_and_verify_svn2('OUTPUT', expected_stdout, [], 0, 'lock', '-m',
Remember, this only saves you typing. Doublecheck everything.
PASS: lock_tests.py 36: lock a file using a comment with xml special chars
There you go. Paste it back, comment out the original factory call (for
Note that the factory test runs a full run_and_verify_commit() instead of
But I think this factory is pretty nice. Saves you a lot of typing. All you
Find more elaborate info in a verbose comment at the top of svntest/factory.py.
Thank you for your attention. :)
------------------------------------------------------
|
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.