qutebrowser/tests
toofar 1c51e60195 Move tree tab moving and dragging tests to test_notree
This commit moves the tests around moving tree tabs into a unit test
targeting the notree library direction. The tests haven't changed but
they run much faster without having to spin up real tabs and windows.
I've left one complex test for each method in the end2end test to make
sure everything is still working there.

I've moved the existing `create_tree()` method into `test_notree.py` and
added a symmetric `tree_to_str()` method. I hope this makes the test
setup more readable than constructing Node objects directly or having
one fixed tree that all the tests operate on.

These tests run in about 150ms on my machine, vs about 20s when they
were using real tabs.

I've used a fancy typed NamedTuple to provide parameters for pytest
because it was quite difficult to discern the different tuple entries
when there was just three strings stacked on top each other. The keyword
arguments make it much more readable than the default pytest setup of
string parameter names and then a big list of tuples. Inspired by these
two posts:

https://til.simonwillison.net/pytest/namedtuple-parameterized-tests
https://mathspp.com/blog/til/better-test-parametrisation-in-pytest
2025-04-27 18:14:44 +12:00
..
end2end Move tree tab moving and dragging tests to test_notree 2025-04-27 18:14:44 +12:00
helpers Merge remote-tracking branch 'upstream/main' into tree-tabs-integration 2025-03-16 12:37:01 +13:00
manual Rename :buffer to :tab-select 2021-01-20 18:00:38 +01:00
unit Move tree tab moving and dragging tests to test_notree 2025-04-27 18:14:44 +12:00
conftest.py Add initial support for running tests offscreen 2025-03-12 14:41:50 +01:00
test_conftest.py reuse: Initial copyright text update for myself 2023-07-23 12:49:05 +02:00