- r878693: 2009-08-07 16:27:38 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/main.py [diff, log, file]
Under Windows, display failing command lines in their quoted form.
The quoting can affect how the command is executed, so display the
quoted form to make it easier to debug the problem.
* subversion/tests/cmdline/svntest/main.py
(open_pipe): Under Windows, return the *quoted* command line as part
of the WAITER return value.
- r878691: 2009-08-07 14:52:46 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/main.py [diff, log, file]
Return the command as a string, rather than as a list, from open_pipe().
The COMMAND value returned from open_pipe() as part of the WAITER
return value is only used to generate error messages, so return it as
a string rather than as a list of strings. Change wait_on_pipe()
accordingly.
* subversion/tests/cmdline/svntest/main.py
(open_pipe): Return the command as a string rather than as a list of
strings. Rename local variable command_list -> command_string to
reflect its new type.
(wait_on_pipe): Expect a string rather than a list of strings as the
second element of the WAITER argument. Rename local variable
command -> command_string to make its type more obvious.
- r878690: 2009-08-07 13:16:48 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/main.py [diff, log, file]
Fix "command" return value under Windows.
For sys.platform == 'win32', the list of command arguments is turned
into a single string containing all of the arguments, quoted. But
this command string was also returned by the method, to callers who
expected it to be a list of strings. In the case of an error, this
return value is processed with ' '.join(), resulting in error messages
like "C : \ p a t h \ t o \ s v n . e x e a r g 1 a r g 2".
This change returns the commands as a list of strings regardless of
whether the command list is turned into a string internally.
Patch by: James Abbatiello <abbeyj@...>
* subversion/tests/cmdline/svntest/main.py
(open_pipe): Return the command list that was passed to the
function, regardless of whether it needs to be converted to a string
internally.
- r878560: 2009-07-28 20:34:39 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/tree.py [diff, log, file]
Read svn properties in XML rather than text format in test suite.
This makes the routine more robust to strange property values. It also
makes it immune to changes in the text output format, as happened
between svn 1.5 and 1.6. (This is useful for the cvs2svn project,
which uses the svntest infrastructure but doesn't want to care what
version of svn the user has installed.)
* subversion/tests/cmdline/svntest/tree.py
(get_props): Read svn properties via "svn proplist -v" using the
"--xml" option.
- r865863: 2007-07-19 11:24:51 [mhagger] Michael Haggerty
-
/notes/dump-load-format.txt [diff, log, file]
Fix dumpfile example in notes/dump-load-format.txt.
Approved by: Daniel Rall <dlr@...>
* notes/dump-load-format.txt: Fix character count for log message.
- r865603: 2007-06-24 22:31:25 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/main.py [diff, log, file]
Don't gratuitously quote harmless command-line arguments.
If a command-line argument obviously doesn't need to be quoted, then
don't quote it. Using a conservative definition of "safe" that should
nevertheless greatly reduce the amount of gratuitous quotation.
* subversion/tests/cmdline/svntest/main.py (_safe_arg_re): New module
variable.
(_quote_arg): If the argument matches the regular expression in
_safe_arg_re, then don't quote it at all.
- r865602: 2007-06-24 22:20:13 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/main.py [diff, log, file]
Extract a function to quote command-line arguments.
This is just a refactoring, with no change of functionality. More to
come...
* subversion/tests/cmdline/svntest/main.py (_quote_arg): New function,
using code taken from spawn_process().
(spawn_process): Use the new function for quoting command-line
arguments.
- r862427: 2006-11-19 23:37:33 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/main.py [diff, log, file]
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Iff a TestCase needs a Sandbox, pass it in as a keyword argument.
Previously TestCase.run() was always passed a tuple argument, which
sometimes (depending on TestCase.need_sandbox()) contained a sandbox.
* subversion/tests/cmdline/svntest/testcase.py (TestCase.need_sandbox,
TestCase.get_sandbox_name): Add docstrings.
(TestCase.run): Make sandbox into a keyword argument, and add a
docstring that tells how the method will be called.
(FunctionTestCase.run): Make sandbox into a keyword argument, and
pass it to the delegate as a keyword argument.
* subversion/tests/cmdline/svntest/main.py (TestRunner.run): Pass
sandbox to test case as a keyword argument.
- r861949: 2006-10-10 21:56:06 [mhagger] Michael Haggerty
-
/www/design.html [diff, log, file]
Add some missing spaces where words had somehow gotten mashedtogether.
* www/design.html: Add some missing spaces.
- r859543: 2006-04-28 14:05:53 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Improved documentation for XFail.__init__.
Suggested by: Daniel Rall <dlr@...>
* subversion/tests/cmdline/svntest/testcase.py (XFail.__init__):
Improve documentation and converted it from a comment to a
docstring.
- r859540: 2006-04-27 23:27:18 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Alter the XFail decorator to be immutable again.
* subversion/tests/cmdline/svntest/testcase.py (XFail.__init__): Add
comment about the deferred evaluation of cond_func.
(XFail.convert_result): Don't modify self._result_text.
(XFail.run_text): New method, overriding method from base class. If
self.cond_func returns true, then output run_text appropriate for a
test that is expected to fail.
- r859539: 2006-04-27 23:22:29 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Don't invert the return results of XFail unless cond_func returns true.
* subversion/tests/cmdline/svntest/testcase.py (XFail.convert_result):
Only invert the return result if self.cond_func returns true.
- r859538: 2006-04-27 23:17:49 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Use lambda:1 as the default initializer for XFail.cond_func.
This avoid having to check it against None before using it.
* subversion/tests/cmdline/svntest/testcase.py (XFail.__init__): Use
lambda:1 as the default initializer for XFail.cond_func.
(XFail.convert_result): No need to test cond_func against None
before calling it.
- r859537: 2006-04-27 23:15:01 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Rename XFail "cond" constructor argument to cond_func.
This is to avoid confusion with the cond argument to Skip's
constructor, which is a simple boolean variable.
* subversion/tests/cmdline/svntest/testcase.py (XFail.__init__,
XFail.convert_result): Rename cond to cond_func.
- r859475: 2006-04-17 22:03:58 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Suppress sandbox creation for tests that are going to be skipped.
* subversion/tests/cmdline/svntest/testcase.py (Skip.need_sandbox): If
self.cond is true, then return false instead of delegating to
self.test_case.
- r859404: 2006-04-12 20:21:35 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Use types.FunctionType instead of type(lambda x: 0).
* subversion/tests/cmdline/svntest/testcase.py: Import types.
(FunctionTestCase.__init__): Use types.FunctionType instead of
type(lambda x: 0).
- r859403: 2006-04-12 19:48:42 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Provide a default value cond=1 for Skip's constructor argument.
Well, a default of 0 wouldn't make much sense, would it?
* subversion/tests/cmdline/testcase.py (Skip.__init__): The "cond"
constructor argument gets a default value of 1, meaning "skip".
Also improved docstring.
- r859392: 2006-04-12 05:34:53 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
If an XFail test throws a Skip exception, then treat it as a skip.
Currently, XFail converts a "skip" result into a "pass". But a "skip"
should remain a "skip". (But since the pre-converted value is used to
choose what test result to output, this modification does not change
the printed output of any tests.)
* subversion/tests/cmdline/svntest/testcase.py (XFail.convert_result):
Convert pass->fail, fail->pass, but leave skip->skip unchanged.
- r859391: 2006-04-12 05:31:41 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/main.py [diff, log, file]
If a test skips, clean up its sandbox.
Previously only tests whose converted results indicated a pass had
their sandboxes cleaned up.
* subversion/tests/cmdline/svntest/main.py (TestRunner.run): Only omit
sandbox cleanup for tests that result in a failure (not tests that
skip).
- r859355: 2006-04-09 00:04:03 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Renamed _Predicate to FunctionTestCase and improved documentation.
* subversion/tests/cmdline/svntest/testcase.py (FunctionTestCase): New
class, renamed from _Predicate. Also improved the class and method
docstrings.
(create_test_case): Construct class using new name.
- r859354: 2006-04-08 23:49:25 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Don't allow a _Predicate to take over the identity of another _Predicate.
Previously, the _Predicate constructor could take either a naked
function object or another _Predicate as argument. If the argument
was a _Predicate instance, it would take over the identity of the
other instance. (This cute trick essentially allows another class to
inherit dynamically from any class that itself inherits from
_Predicate.)
For the unenlightened, the above-mentioned trick has the disadvantage
that it leads to extremely tight coupling between _Predicate and the
classes derived from it, decreasing maintainability and limiting the
uses of the derived classes.
Now that no more classes inherit from _Predicate, this trick is no
longer needed.
* subversion/tests/cmdline/svntest/testcase.py (_Predicate.__init__):
Only allow a _Predicate to be constructed using a naked function
object, not using another _Predicate.
- r859351: 2006-04-08 23:38:23 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Rewrite Skip to wrap a TestCase instead of inheriting from _Predicate.
Previously, Skip inherited from _Predicate, and due to the peculiar
implementation of _Predicate, this only allowed Skip to wrap
_Predicates or naked functions, but not arbitrary TestCases.
This commit changes Skip to inherit directly from TestCase and to wrap
an arbitrary instance of TestCase. Most methods are delegated to the
wrapped TestCase, and some are implemented in Skip to modify the
behavior.
* subversion/tests/cmdline/svntest/testcase.py (Skip): Rewritten as
described above.
- r859350: 2006-04-08 23:30:51 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Rewrite XFail to wrap a TestCase instead of inheriting from _Predicate.
Previously, XFail inherited from _Predicate, and due to the peculiar
implementation of _Predicate, this only allowed XFail to wrap
_Predicates or naked functions, but not arbitrary TestCases.
This commit changes XFail to inherit directly from TestCase and to
wrap an arbitrary instance of TestCase. Most methods are delegated to
the wrapped TestCase, and some are implemented in XFail to modify the
behavior.
* subversion/tests/cmdline/svntest/testcase.py (XFail): Rewritten as
described above.
- r859348: 2006-04-08 23:23:15 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Don't check type of func redundantly.
If func is an instance of _Predicate, then it's func member has
necessarily already been checked to be a pure function, so skip that
test.
* subversion/tests/cmdline/svntest/testcase.py (_Predicate.__init__):
Don't test the type of func if it was taken from another _Predicate
instance.
- r859347: 2006-04-08 23:12:40 [mhagger] Michael Haggerty
-
/subversion/tests/cmdline/svntest/testcase.py [diff, log, file]
Don't wrap something that is already a TestCase.
This modification allows any user-created class that inherit from
TestCase to be used as a test (though such tests may not yet be
wrapped in XFail or Skip).
* subversion/tests/cmdline/svntest/testcase.py (create_test_case):
Check if func is already an instance of TestCase. If so, don't wrap
it.