Running test_standarddir would pollute the user's home with
`~/.cache/qute_test`.
The `no_cachedir_tag` fixture was supposed to prevent this, but was not
working because [usefixtures does not work on fixtures]
(https://github.com/pytest-dev/pytest/issues/1014).
This fixes the fixture to actually prevent cachedir creation, but
applies it to tests individually (or by class) rather than with autouse
because the cachedir tests cannot pass if it is working.
Running the tests would create ~/.config/qute_test and
~/.local/share/qute_test on the user's machine. The test_standardir
module needed a bit more mocking to prevent it from cluttering the
user's machine.
Two tests that created the data dir were fixed by passing basedir in
args, and one test that created the config dir was fixed by patching
os.makedirs to a noop.
In the last CherryPy update, cherrypy.wsgiserver got converted to a
single module. While this issue still exists in pylint, we don't get it
here anymore.
* Do not crash when printing the help of options with default regular
expressions
* More granular versions for deprecated modules.
* Do not crash in docparams when we can't infer the exception types.
- Test functions defined using @given can now be called from other
threads
- Attempting to delete a settings property would previously have
silently done the wrong thing. Now it raises an AttributeError.
- Creating a settings object with a custom database_file parameter was
silently getting ignored and the default was being used instead. Now
it’s not.
We have some things like pos_px stubbed which will fail any test because
of the stub warning - but some tests don't actually need that, it just
happens when e.g. loading something.
So let's not fail tests based on stub warnings, and see how much works
that way.
We've had many checks disabled - these are the ones we actually lose:
L104
Docstrings must use Napoleon, not reStructuredText fields.
L205
__init__.py is not allowed to contain function or class definitions.
L206
Implicit relative imports are not allowed.
L208
Pokémon exception handling is always a mistake. If the intent is
really to catch and ignore exceptions, explicitly name which
exception types to silence.
L209
return, del, raise, assert, print (in python 2, without
print_function) yield, and yield from are statements, not functions,
and as such, do not require parentheses.
L210
Instead of intentionally relying on the side effects of map, filter,
or a comprehension, write an explicit for loop.
L211
Using map or filter with a lambda as the first argument is always
better written as list comprehension or generator expression. An
expression is more readable and extensible, and less importantly,
doesn't incur as much function call overhead.
L212
Using @staticmethod is always wrong.
L301
Files must end with a trailing newline.
L303
noqa is ignored, and as such, # noqa comments should be deleted to
reduce pointless noise.
However, most of those are also checked by pylint (and the rest I don't
really care about), and ebb-lint increases flake8's runtime a lot
(45s -> almost 2min).
Per one of the diff comments on #1597:
> I used to use a tuple for constant things, but nowadays I'd actually
> prefer a list as a tuple is something more heterogeneous (i.e. it
> makes sense to have a `(x, y)` point as a tuple, but a list of points
> would be a list).
> At some point I should probably change it to a list everywhere 😉
This approach is not as weird in Python and still works.
DownloadTarget.OpenDownload has been renamed to OpenFileDownloadTarget,
since OpenDownloadDownloadTarget didn't look as nice.