Commit Graph

35 Commits

Author SHA1 Message Date
TomJGooding
7a9d32fdbf test: make tests async to fix failures on Python 3.9
After upgrading `pytest-asyncio` to the latest version, lots of tests
started failing in CI only on Python 3.9:

`RuntimeError: There is no current event loop in thread 'MainThread'`

Apparently these tests may have only been passing previously due to
issues in earlier versions of `pytest-asyncio`. Changing these tests to
async seems to fix the failures on Python 3.9.

Related issue:
https://github.com/pytest-dev/pytest-asyncio/issues/1039
2025-09-17 13:38:05 +01:00
Will McGugan
f3842c6789 test 2025-07-10 08:48:23 +01:00
Will McGugan
29f7adc5a1 change to app query model 2025-02-19 21:13:18 +00:00
Will McGugan
14159420c0 query errors 2024-10-28 21:18:09 +00:00
Will McGugan
011ac1df59 Faster query_one 2024-08-28 14:45:24 +01:00
Will McGugan
10887ee8ef fix test 2024-05-12 18:12:44 +01:00
Will McGugan
26f9a12593 add tests 2024-05-12 17:41:43 +01:00
Rodrigo Girão Serrão
11804f8be1 Add tests / changelog. 2024-03-04 15:33:38 +00:00
Will McGugan
e701a8fad3 docs 2024-02-25 17:07:12 +00:00
Will McGugan
d06a53a8e4 test fix 2024-02-24 16:50:04 +00:00
Will McGugan
e4c85ffb79 Signal (#4012) 2024-01-23 17:20:11 +00:00
Rodrigo Girão Serrão
00376a62d3 query.py coverage 100%.
Increase coverage on 'query.py'.
2023-10-03 16:04:00 +01:00
Will McGugan
eaca92bd37 Set classes (#2160)
* Setting classes

* changelog

* docstrings

* test bad identifiers

* Update CHANGELOG.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Add return of self

---------

Co-authored-by: Dave Pearson <davep@davep.org>
2023-03-28 15:45:40 +01:00
Darren Burns
9287f64a66 Add isort pre-commit hook, sort imports in src and test directories 2023-02-09 13:28:08 +00:00
Darren Burns
d06fca1041 Improving universal selector test 2022-12-21 11:28:19 +00:00
Darren Burns
78f06c9d1b Add test for universal selector 2022-12-20 20:19:53 +00:00
Dave Pearson
ab760dbe80 Add a test for numbers within a type query name
Add a failing test due to #1253.
2022-11-24 21:04:36 +00:00
Dave Pearson
c1cfdffc96 Change query_one so that it raises an error on multiple hits
As part of this, add a only_one method to DOMQuery.

Addresses #1096.
2022-11-03 13:44:51 +00:00
Dave Pearson
457340777b Change DOM queries to be case-sensitive for classes and IDs
See #1041 and #1047.
2022-10-31 15:25:22 +00:00
Dave Pearson
0e3090352c Merge branch 'main' into query-tests 2022-10-25 14:14:03 +01:00
Dave Pearson
22d53c827e Add tests for doing class work via a query 2022-10-25 14:03:43 +01:00
Dave Pearson
f217310b60 Add a test for a query result with no filter 2022-10-25 11:38:34 +01:00
Dave Pearson
6fcd93bd2a Add tests for a query exclusion 2022-10-25 11:34:58 +01:00
Dave Pearson
661fabb62c Add tests for a query filtering 2022-10-25 11:26:09 +01:00
Dave Pearson
0019f26617 Add tests for a query __getitem__ 2022-10-25 10:50:02 +01:00
Dave Pearson
e68a07d228 Add tests for reversing a query 2022-10-25 10:31:11 +01:00
Dave Pearson
aa9f53fa5b Add testing for the __bool__ method of a query 2022-10-25 10:29:10 +01:00
Dave Pearson
bd55830d53 Add query tests relating to first/last 2022-10-25 10:24:40 +01:00
Will McGugan
6f602f02c0 Add sensible error to query 2022-10-23 09:52:31 +01:00
Will McGugan
b22436933a lots of docstrings 2022-08-25 09:08:35 +01:00
Will McGugan
4ac4f3cee6 added results method 2022-08-13 12:25:35 +01:00
Will McGugan
f00e2d22d4 header fixes, and lazy queries 2022-08-13 09:12:59 +01:00
Will McGugan
99c87e5519 apply rules 2021-11-04 16:21:38 +00:00
Will McGugan
4e66c48313 more query tests 2021-11-03 11:01:59 +00:00
Will McGugan
25e8f86b93 selector tests 2021-11-02 17:01:13 +00:00