| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
This patch does a bit of refactoring to the Settings class for it's
setup, and adds a reload method. The refactoring encapsulates the
handling of NoneType for the read_*config methods, and reworks the
constructor just a bit so that it doesn't rely on calling methods to
create instance variables.
The end result is slightly cleaner, and will be useful for adding a
reload command to alot itself.
|
| |
|
|
|
|
| |
makes pylint happier to run tests, doesn't affect main pytest.
|
|
|
|
| |
Or it wont be picked up by some test discovery methods.
|
|
|
|
|
|
|
| |
Instead of manual parsing with regexp and manual string formatting the
functions from email.utils are used. This fixes some small
inconsistencies with addresses with empty realnames and with commas in
realnames.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This fixes a bug in determine_sender where an account that did match but
did not have a realname set was "not found" in case force_realname was
set.
Helped-By: Pol Van Aubel <dev@polvanaubel.com>
|
|
|
|
| |
The second test case exemplifies a bug in determine_sender.
|
|
|
|
|
| |
Otherwise the next account in the for loop might have been returned if
the account was found to match with its last alias.
|
|
|
|
|
| |
This test case exemplifies a bug in determine_sender. The address is
matched correctly but the wrong account is associated with it.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
add some first tests for settings.manager.SettingsManager
|
| | |
|
|/
|
|
|
| |
This doesn't cover the actually complex part of the of the module, but
it's a few basic tests.
|
|
|
|
|
|
| |
Instead us %p, which differs only in the case of the am/pm.
Fixes #1048
|
|
|
|
|
| |
The OSError that is being caught should only be raised by the Popen
constructor: https://docs.python.org/3/library/subprocess.html#exceptions
|
| |
|
|
|
|
|
|
|
|
|
| |
There are a number of things pylint warns on that absolutely make sense
to fix in production code, but for unittests they either don't matter
(like naming variables "foo"), can't be fixed (TestCase methods that
don't use self because they use a mock assert), or the descriptive names
violate PEP8. These are annoying and create noise, so tell pylint to
ignore them.
|
|
|
|
|
| |
This both fixes a test that failed (since stderr wasn't being set) and
simplifies the function to only have one path that uses a ternary.
|
|
|
|
| |
This even finds a bug!
|
| |
|
| |
|
|\
| |
| | |
Remove remaining uses of cmp
|
| |
| |
| |
| |
| |
| | |
This is both a performance issue (since cmp is slower than rich
comparisons), and a python3 issue since cmp (and __cmp__) are gone in
python 3.
|
| | |
|
|\ \
| | |
| | | |
Silence argparse validator test
|
| |/ |
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Technically a kilobyte (and it's derivatives like megabytes and
gigabytes) are defined as powers of 1000, while a kibibyte (and it's
derivatives like mibibytes and gibibytes) are defined as powers of 1024.
This patch fixes incorrect language and formatting in the humanize_size
function which defined a kilobyte as 1024.
See this wikipedia article for more information:
https://en.wikipedia.org/wiki/Kibibyte
|
|\
| |
| | |
argparse validators
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds a new argparse.Action class validates input using a new
keyword argument that takes a validator function. This will allow us to
replace the use the type keyword as a validator, which is both more
correct, and frees up the type keyword to do what it's actually meant to
do, convert the input from one type to another.
It also adds 3 new validator functions that will be enabled in the next
commit. One that checks for a required file, one that checks for an
optional directory, and one that looks for a required file, fifo, or
block special device (/dev/null).
|
| |
| |
| |
| | |
This is just more reorganization.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
unittests for helper module.
|