* Move documentation changes of bookmark / quickmarks to docstrings, as the
asciidoc is autogenerated from those
* Fix some whitespaces in the BDD test cases
* Improved docstring in qute_bookmarks handler
There is a new page now, qute:bookmarks that will display all bookmarks and
quickmarks. It's still missing a search / filter feature, but you can use
the built-in search / navigation just as easily for now.
The message mock might handle a message during pytest-qt's processEvents
during test setup. If that happens, depending on the fixture order,
pytest-caplog might not be set up first, which is why the
self._caplog.at_level call can fail:
File "c:\projects\qutebrowser\qutebrowser\misc\guiprocess.py", line 105, in on_finished
immediately=True)
File "C:\projects\qutebrowser\tests\helpers\messagemock.py", line 71, in _handle_error
self._handle(Level.error, *args, **kwargs)
File "C:\projects\qutebrowser\tests\helpers\messagemock.py", line 65, in _handle
with self._caplog.at_level(log_level): # needed so we don't fail
File "C:\projects\qutebrowser\.tox\py34\lib\site-packages\pytest_catchlog.py", line 232, in at_level
obj = logger and logging.getLogger(logger) or self.handler
File "C:\projects\qutebrowser\.tox\py34\lib\site-packages\pytest_catchlog.py", line 186, in handler
return self._item.catch_log_handler
AttributeError: 'Function' object has no attribute 'catch_log_handler'
Full stack:
c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytestqt\plugin.py(100)pytest_runtest_setup()
-> _process_events()
c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytestqt\plugin.py(140)_process_events()
-> app.processEvents()
c:\projects\qutebrowser-git\qutebrowser\misc\guiprocess.py(94)on_error()
-> self._what, msg), immediately=True)
c:\projects\qutebrowser-git\tests\helpers\messagemock.py(71)_handle_error()
-> self._handle(Level.error, *args, **kwargs)
c:\projects\qutebrowser-git\tests\helpers\messagemock.py(65)_handle()
-> with self._caplog.at_level(log_level): # needed so we don't fail
c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytest_catchlog.py(235)at_level()
-> obj = logger and logging.getLogger(logger) or self.handler
> c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytest_catchlog.py(189)handler()->None
This should fix broken AppVeyor builds.
Fixes#1662.
* Beautiful Soup is no longer compatible with Python 2.6. This
actually happened a few releases ago, but it's now official.
* Beautiful Soup will now work with versions of html5lib greater than
0.99999999.
* If a search against each individual value of a multi-valued
attribute fails, the search will be run one final time against the
complete attribute value considered as a single string. That is, if
a tag has class="foo bar" and neither "foo" nor "bar" matches, but
"foo bar" does, the tag is now considered a match.
This happened in previous versions, but only when the value being
searched for was a string. Now it also works when that value is
a regular expression, a list of strings, etc.
* Fixed a bug that deranged the tree when a whitespace element was
reparented into a tag that contained an identical whitespace
element.
* Added support for CSS selector values that contain quoted spaces,
such as tag[style="display: foo"].
* Corrected handling of XML processing instructions.
* Corrected an encoding error that happened when a BeautifulSoup
object was copied.
* The contents of <textarea> tags will no longer be modified when the
tree is prettified.
* When a BeautifulSoup object is pickled but its tree builder cannot
be pickled, its .builder attribute is set to None instead of being
destroyed. This avoids a performance problem once the object is
unpickled.
* Specify the file and line number when warning about a
BeautifulSoup object being instantiated without a parser being
specified.
* The `limit` argument to `select()` now works correctly, though it's
not implemented very efficiently.
* Fixed a Python 3 ByteWarning when a URL was passed in as though it
were markup. Thanks to James Salter for a patch and
test.
* We don't run the check for a filename passed in as markup if the
'filename' contains a less-than character; the less-than character
indicates it's most likely a very small document.
* Recurse into all the ancestors when checking if an object is an exception
Since we were going only into the first level, we weren't inferring
when a class used a metaclass which defined a base Exception class
for the aforementioned class.
* Added tool to automatically convert request params based on type
annotations (primarily in Python 3). For example:
@cherrypy.tools.params()
def resource(self, limit: int):
assert isinstance(limit, int)
The _filterstr attribute was not cleaned up properly and persisted
between hintings. In this case, it was set to something representing the
Escape key.
Using the config_tmdpir fixture across all tests in this module caused
a lingering LineParser to make test_debug fail.
I still don't know why, but scoping the config_tmpdir fixture to only
the test class that was creating ~/.config/qute_test fixes the issue,
and still prevents creation of a user tempdir.
This was more complicated than the other data/config/cachedir test
fixes, as QtWebEngine was accessing the datadir directly (and bypassing
standdarddir.data).
This means the tmpdir_data stub is not enough, we need to set
XDG_DATA_HOME to redirect access.
Don't create ~/.config/qute_test by mocking out standdarddir.config for
all tests in this module.
This adds config_tmpdir to fixtures.py and moves temp_datadir from
test_adblock to fixtures.py as it will be needed more broadly.
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.