Commit Graph

39 Commits

Author SHA1 Message Date
lilydjwg
de1a3c6fc2 record rich results in verfile and get rid of Result & VersData types
Use RichResult to replace Result; Result was RichResult plus entry name.
2024-03-14 18:30:15 +08:00
David Arnold
f29bdee6a3
feat: return full results from result processing 2024-03-14 10:40:25 +01:00
Chih-Hsuan Yen
4ca61ba11a tests: fix for pytest-asyncio 0.23 2023-12-09 20:38:00 +08:00
lilydjwg
af77af34f3 fight mypy[1]
The following error will be reported without if:

  error: Name "tomllib" already defined (by an import)

While this can be silenced by a "# type: ignore", in some case[2] mypy
will report the following error:

  error: Unused "type: ignore" comment

[1]: https://github.com/python/mypy/issues/1153
[2]: https://github.com/lilydjwg/nvchecker/actions/runs/4916840821/jobs/8793454970
2023-05-09 13:31:11 +08:00
lilydjwg
e9ecbd514b silence mypy for new module 2023-05-08 23:28:20 +08:00
Felix Yan
34e87db8f9
Use tomllib on Python 3.11+
Fallback to tomli for compatibility with older Python.
2023-05-08 10:52:27 +03:00
lilydjwg
fad7cf631d Merge remote-tracking branch 'origin/pr/212'
Conflicts:
      setup.cfg
      setup.py
2022-11-20 13:42:22 +08:00
lilydjwg
914c6414e8 fix tests trying to raise exc_info=True 2022-06-12 14:22:14 +08:00
Dusk Banks
2598b0fd19 tests: pytest-asyncio asyncio_mode -> strict
the `asyncio_mode` of `legacy` (current default) is deprecated.
`asyncio_mode` will be `strict` by default in the future.
2022-03-03 09:56:33 -08:00
lilydjwg
1fb3c970cf fix types and tests 2022-01-20 16:38:10 +08:00
lilydjwg
5e60a1dc86 replace the toml library with tomli 2021-12-29 16:36:23 +08:00
lilydjwg
ae506ba9cf add a combiner source and the underlying mechanism to wait for other entries' results 2021-06-08 14:55:57 +08:00
lilydjwg
4f3a900505 setup httpclient from configuration options
closes #76
2020-09-28 15:09:51 +08:00
lilydjwg
cd1cbfde30 support per source plugin configuration and support different registry for the npm source 2020-09-24 18:27:30 +08:00
lilydjwg
185a7e88a9 use asyncio.Semaphore instead of self-made queue 2020-09-20 22:15:54 +08:00
lilydjwg
e228e31b84 final tweak of keyfile 2020-08-20 15:18:43 +08:00
lilydjwg
95150fa8e9 port github source and tests (the last one!)
`include_tags_pattern` and `ignored_tags` removed, see #99
2020-08-20 15:18:28 +08:00
lilydjwg
4887ec66d9 port more tests 2020-08-17 16:21:02 +08:00
lilydjwg
10f6b1561e start porting tests to new version 2020-08-17 15:11:14 +08:00
lilydjwg
14b3863f11 version 2: MVP 2020-08-11 17:43:03 +08:00
lilydjwg
1bcd02aad2 tests: session-scoped ioloop is needed for aiohttp support 2020-07-02 16:10:39 +08:00
lilydjwg
cbd7e13867 tornado: construct AsyncHTTPClient each time so that it uses the right ioloop
This is a better fix for #129.
2020-07-02 15:07:19 +08:00
lilydjwg
36c995eef6 tests: set event_loop fixture to be session scoped
fixes https://github.com/lilydjwg/nvchecker/issues/129.
2020-07-02 00:45:55 +08:00
lilydjwg
09f65b2dc3 add a test for cmd with % 2020-02-28 16:02:16 +08:00
lilydjwg
6f48b774ae tests: add a needs_net mark for tests that require Internet access
use pytest-httpbin for test_regex

closes #113
2019-10-15 17:27:34 +08:00
lilydjwg
b1856f7426 test: don't raise RuntimeErrors for no-result warnings 2019-05-01 17:26:10 +08:00
lilydjwg
cc763205e8 test: don't raise RuntimeError for rate limited logs 2019-04-08 12:15:49 +08:00
Chih-Hsuan Yen
7dab7c3b6a
Get rid of warnings from logging.warn
logging.warn is deprecated [1].

[1] https://docs.python.org/3/library/logging.html#logging.Logger.warning
2019-03-23 23:59:13 +08:00
Chih-Hsuan Yen
2a9b60155b
Re-raise previous exceptions 2019-03-07 16:45:14 +08:00
Chih-Hsuan Yen
ab1ecc231d
Raise exceptions on all warnings and errors in tests 2019-03-07 16:25:54 +08:00
lilydjwg
e2fb91d3fb tests: fix clear_cache arg 2018-10-10 17:22:02 +08:00
lilydjwg
10e3478b12 fix test_keyfile
keyfile is not part of cache keys so the expectations are wrong.

We don't make it part of cache keys because we don't expect keyfile to
affect the version as long as we can get it.
2018-10-10 17:17:02 +08:00
lilydjwg
26eaef92aa handle deprecated warning, reindent conftest.py 2018-10-10 17:08:28 +08:00
Chih-Hsuan Yen
1d16726c90
Add missing_ok, which suppresses no-result warnings 2018-09-21 12:17:21 +08:00
lilydjwg
3da3e356fa github: give an explicit error message when rate limited
also update tests.
2018-05-08 19:15:36 +08:00
lilydjwg
6fcf5869ad add test_keyfile 2018-05-08 18:18:10 +08:00
lilydjwg
7133ffc1a0 [test] yield_fixture is deprecated 2018-01-23 15:39:59 +08:00
lilydjwg
1bb14397ed no need to return name now; we track this on the futures 2017-07-08 15:59:54 +08:00
Felix Yan
84df2716b5 AsyncIO rewrite 2017-07-06 12:24:45 +08:00