| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
The two main reasons are
- to run `python3 -m unittest discover` without specifying a custom
`--pattern *_test.py`
- to include the test files automatically when generating the MANIFEST
file.
|
|
|
|
|
| |
... since accounts' addresses can overlap and get_account_by_address
promises too much. Also remove now-obsolete get_addresses.
|
|
|
|
| |
fixes #1230, fixes an unfiled bug in clear_my_address()
|
|
|
|
| |
simplifies a few tests, fixes #1177
|
|
|
|
|
| |
The logging messages appear in between the test output. By asserting
them they are hidden from the output.
|
|
|
|
|
|
| |
This allows it to easily wrap calls that are themselves coroutines,
while it's still able to wrap synchronous calls. This fixes the async
test and allows hooks that are coroutines to work.
|
|
|
|
|
| |
This basically just tests that a synchronous and an asynchronous
function work, (the async doesn't yet).
|
|
|
|
| |
all unittests now use asyncio and the standard unittest framework.
|
|
|
|
|
|
|
|
|
|
|
| |
asyncio's Futures are much like twisted's Deferreds, they represent a
value that is not yet available, and they can be awaited like a
coroutine.
For the moment we still need to return a deferred because the twisted
eventloop doesn't use Futures, it uses Deferreds; once we can remove
twisted's eventloop we can remove the conversion from a Future to a
deferred.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Rather than returning a deferred in some cases, this makes the function
a coroutine, in some cases it calls regular subprocess, in other cases
it uses asyncio subprocess.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Email utils apparently assumes it's getting a string, and calls encode
directly. This can only be hit if you have a single account configured,
not with multiple accounts.
Fixes #1277
|
|\
| |
| | |
fix: automatically update envelope gpg keys only if requested. see #1228
|
| | |
|
| | |
|
|/
|
|
|
|
|
| |
- SettingsManagers is now instantiated without config paths
and instead `read_[notmuch]config` is called separately
- test_no_user_setting_* are removed, because we do not need to test
what config path SettingsManager uses anymore (this is now explicit)
|
|
|
|
| |
They are not needed for python >= 3.0.
|
|
|
|
|
|
|
|
| |
This reverts commit d01d2e51da45dd87f0abf98b8a856f3b3de69153.
I don't think that this patch really improved readability that much. The
right solution is to split ComposeCommand.apply so we don't need so many
mocks.
|
| |
|
| |
|
|
|
|
| |
This allows writing less-nested statements.
|
|
|
|
|
| |
Which compares that the lists have the same elements, but doesn't check
their order.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This just wries the new Address class into alot for use, and fixes up a
few places where such fixups are needed.
Fixes #1107
|
|
|
|
|
|
|
|
|
|
| |
Otherwise the editor will crash.
I can't figure out for the life of me to test this. I thought that I
would be able to do something like detect if stdin is a tty or something
else, but that doesn't seem to work.
Fixes #1137
|
| |
|
|
|
|
|
| |
These tests were wrong they would always pass, even if the code
underneath was broken. With this fix they actually work.
|
| |
|
|
|
|
|
|
| |
This doesn't test the spawn path, which is a little bit more
complicated since it's running code in a thread instead of in the main
thread.
|
|
|
|
|
| |
This decorates test methods that internally call a `cmd.apply()`,
which represents asynchronous code that returns a `twisted.deferred`.
|
|
|
|
|
| |
These test only check if get_account_by_address is called correctly.
All other parts of `apply()` are left out.
|
|
|
|
|
|
| |
This instantiates an actual Envelope object instead of a Mock object
for use in the tests for envelope commands. The tests then do not fail
when they hit implicit getters of the form envelope['From'].
|
|\
| |
| | |
Fix issue 1113
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently anything except "user@domain" (such as
"User Name <user@domain>"), will not work with the sign command, because
settings.get_account_by_address wants just the "user@domain" bit, and we
don't split it.
Fixes #1113
|
| |
| |
| |
| |
| | |
These tests exercise issue 1113, which has to do with extracting the
mail correctly from the 'From' header.
|
| |
| |
| |
| |
| | |
I wrote these looking at a bug, but they turned out not to be helpful
there, but they should be useful all the same.
|
| |
| |
| |
| |
| |
| | |
Currently it's possible to set sign_by_default without setting a default
key. This is obviously not a good plan for all sorts of reasons. This
fixes the two failing tests from the last commit.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds tests to exercise #1110.
These tests operated on a twisted async method, based on the
inlineCallbacks decorator (which creates a deferred, but looks like
synchronous code). The tests therefore have to use twisted's trial
module for unittest. These seem to operate mostly correctly using the
standard python unittest runner, pass and fail work right, but expected
failure does not. Instead of an expected failure, you get pass.
I really am not impressed with trial. After several hours of mucking
with it I never got it to run any tests, just spit out errors or do
nothing. pytest can run these tests just fine, and if we're going to
change test runner I'll again say that pytest is much nicer to work
with.
|
|
|
|
| |
The test file is also renamed.
|