Timeline


and

Jan 3, 2019:

3:07 PM SubversionVsMercurialRevisions edited by schwa
Point to new mailing list archive (diff)

Jan 2, 2019:

12:19 PM Changeset [1754:ab3eaedc03cb]default by Stefan Schwarzer <sschwarzer@…>
Use `ScriptedSession` in `TestRecursiveListingForDotAsPath` Update the tests in `TestRecursiveListingForDotAsPath` to use the new test code in `scripted_session.py`.
12:17 PM Changeset [1753:54a4611470c3] by Stefan Schwarzer <sschwarzer@…>
Simplify "__init__" call assertion `ScriptedSession._next_call` already has an argument for checking if the next call is an expected call. Therefore, just use the argument instead of using an extra `assert` statement.

Jan 1, 2019:

2:50 PM Changeset [1752:1d6514ef2206] by Stefan Schwarzer <sschwarzer@…>
Explain specific error text If we used `result=ftplib.error_perm`, `chmod` would only see a generic `FTPOSError`, not a `CommandNotImplementedError` (which derives from `FTPOSError`).
2:30 PM Changeset [1751:91115f000cd9] by Stefan Schwarzer <sschwarzer@…>
Use `ScriptedSession` in `test_command_not_implemented_error`
2:10 PM Changeset [1750:2930f3422938] by Stefan Schwarzer <sschwarzer@…>
Improve formatting in `test_set_parser`
2:05 PM Changeset [1749:a72b82f6aeaa] by Stefan Schwarzer <sschwarzer@…>
Convert more tests to use `ScriptedSession`
2:04 PM Changeset [1748:59ed56ce841c] by Stefan Schwarzer <sschwarzer@…>
Add `ScriptedSession.dir` method The result handling for this method is different from the default result handling. `dir` will treat its `Call.result` attribute as a multiline string and call the `callback` argument on each line of this multiline string.
1:59 PM Changeset [1747:ffa05876b460] by Stefan Schwarzer <sschwarzer@…>
Improve `Call` and `ScriptedSession` Some of the changes: - Allow passing expected args and kwargs to `Call` constructor and have them checked against the actual args and kwargs. - Move the call logic (raise or return) into the new method `Call.__call__`. - Print more output to help with debugging. (Pytest will print this output only if a test fails.) - Use an integer index instead of an iterator to get the next scripted call. This change makes it easier to "see" in the debugger "where" we are in the execution.

Dec 31, 2018:

11:05 PM Changeset [1746:72d797a82efe] by Stefan Schwarzer <sschwarzer@…>
Add test support class `ScriptedSession` This code is intended as the replacement of (most of) the currently used mock code. In the current mock code, multiple tests sometimes share test data. Hence, a developer must be careful not to add a test and make other tests fail as a side effect. The basis of the new mock code is the class `scripted_session.ScriptedSession`, which is used as (kind of) a replacement for the session factory argument of `FTPHost`. Since `ScriptedSession` needs a `script` parameter that common session factories don't take, I added a helper function `scripted_session.factory`, which takes a `script` and returns a session factory that can be used in `FTPHost`. With the new test code, I could rewrite some of the tests in `test_host.py` rather nicely. I was able to remove the session class `UnnormalizedCurrentWorkingDirectory`. However, I had to keep `FailOnLoginSession`, but only because the class is still used in another test module. I'm not yet sure how well the new approach will work with the remaining tests, but I'm about to find out. I couldn't determine this just by looking at the test code.
Note: See TracTimeline for information about the timeline view.