Timeline


and

Jan 28, 2019:

9:07 PM Changeset [1761:23c1639ea0e5]default by Stefan Schwarzer <sschwarzer@…>
Remove `ScriptedSession` from `__all__` `ScriptedSession` shouldn't be used directly. Instead use `factory` to create `ScriptedSession`s implicitly.
9:01 PM Changeset [1760:5eb6ef13362a] by Stefan Schwarzer <sschwarzer@…>
Implement the multi-script factory more clearly Use a class `MultisessionFactory` with a `__call__` method to return consecutive factories that will use the respective scripts from the constructor argument `scripts`. See also the docstring of `MultisessionFactory` for an example.
8:43 PM Changeset [1759:e207929eef6c] by Stefan Schwarzer <sschwarzer@…>
Generalize session factory creation Allow more than one script in the `factory` function. For each script in `scripts`, a new `ScriptedSession` with the corresponding `script` will be used when the factory is called by `FTPHost._make_session`. The implementation seems to work fine, but it's even more difficult to understand than the previous version. I'm considering implementing this with a class.
8:21 PM Changeset [1758:ebd10c7d0d1f] by Stefan Schwarzer <sschwarzer@…>
Explain purpose of `init` call
7:45 PM Changeset [1757:480538e14451] by Stefan Schwarzer <sschwarzer@…>
Print when a session factory is called Print when a session factory is called, in other words, when a new `ScriptedSession` is instantiated. This is very helpful for tests that involve more than one `ScriptedSession` instance, e. g. tests for the download/upload functionality.
7:43 PM Changeset [1756:ad291ad87245] by Stefan Schwarzer <sschwarzer@…>
Prefix `print`s with `ScriptedSession` instance When printing from a `ScriptedSession` instance for tracking/debugging, prepend information on the respective `ScriptedSession` instance. Example: <ScriptedSession at 0x7ff1881a72e8> Expected method name: '__init__' This makes it much clearer what's going on if a test needs more than one `ScriptedSession`.
7:11 PM Changeset [1755:c7abe644763b] by Stefan Schwarzer <sschwarzer@…>
Comment `_index` instance variable
6:29 PM Ticket #116 (Deal with Pylint messages) closed by schwa
fixed: With the current Pylint configuration messages are manageable now. The …
6:16 PM Ticket #110 (Directory listings are empty if a server doesn't support the`-a` option) closed by schwa
fixed: This is changed in master (changeset [766c15f83205]).

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] 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.