Commit graph

41 commits

Author SHA1 Message Date
Tobias Gruetzmacher
af20ca7478
Simplify update checker
Motivated by the distutils removal, this replaces version parsing by a
"good enough" version comparison algorithm...
2023-10-29 19:05:20 +01:00
Tobias Gruetzmacher
355ef44b7e
Unify cmd tests to use capfd 2023-06-09 22:34:13 +02:00
Tobias Gruetzmacher
0d8e1b4a6f Fix basepath prefix removal
This was a funny bug that has existed for 9 years. It only manifests if
a scraper name starts with the configured basepath... Since the default
basepath is `Comics`, this might manifest if the user wants to fetch
something like `ComicsKingdom/Tiger`. Internally, dosage was removing
the prefix matching the basepath, so we end up with `Kingdom/Tiger`.
This won't cause any problems as long as this substring is still unique
for all supported comics, but if this now matches multiple comics, an
error is thrown...
2022-06-05 23:55:18 +02:00
Tobias Gruetzmacher
87f4049347 Try to fix some more comics using the Internet Archive 2021-01-31 23:40:21 +01:00
Tobias Gruetzmacher
e64635e86b Stricter style checking & related style fixes 2020-10-11 20:15:27 +02:00
Tobias Gruetzmacher
d487485815 Read scraper modules from user data directory
This allows users to add scrapers without setting up a complete Python
development environment.
2020-10-04 23:46:57 +02:00
Tobias Gruetzmacher
5ec0710d26 Enhance test to test timestamp output 2020-10-04 22:14:06 +02:00
Tobias Gruetzmacher
d0162cfb32 Add a test for the "dosage @" feature 2020-10-01 14:35:33 +02:00
Tobias Gruetzmacher
27d28b8eef Update file headers
The default encoding for source files is UTF-8 since Python 3, so we can
drop all encoding headers. While we are at it, just replace them with
SPDX headers.
2020-04-18 13:45:44 +02:00
Tobias Gruetzmacher
e70bf8c7ad Small style fixes (mostly in tests) 2020-04-18 13:03:02 +02:00
Tobias Gruetzmacher
44791439a5 Drop Python 2 support: Obsolete future statements 2020-02-04 01:06:19 +01:00
Tobias Gruetzmacher
66b89f4fed Fix update check
It should return assets for all platforms, since the repo tarball is
unsuitable for setuptools_scm. Preferred asset is the universal wheel.
2020-01-26 17:42:35 +01:00
Tobias Gruetzmacher
db2ff4c3c1 Test image "resizing" 2020-01-04 15:59:49 +01:00
Tobias Gruetzmacher
adb3db3d22 Add some tests for the update check 2019-12-05 22:23:48 +01:00
Tobias Gruetzmacher
fcebd63e66 Speed up tests by mocking time.sleep() 2019-12-03 23:52:14 +01:00
Tobias Gruetzmacher
4d2fac1a9c Make it easier to write tests for comic modules
This also adds a simple test for the "turnoff" module to demonstrate
these features.
2019-12-01 22:36:49 +01:00
Tobias Gruetzmacher
00d0201c5f Fix a bunch of flake8 issues 2019-11-04 00:16:25 +01:00
Gervásio Júnior
6c8814fe40 Fix multiple imgs for json flag & ZenPencils bouncer (#133)
When using the JSON output flag, if the page has more than one image,
dictionary indexing cannot be used as list.

For the ZenPencils comic, the bouncer is missing, saving the page url
as the root url.
2019-06-19 07:09:33 +02:00
Tobias Gruetzmacher
d88f6aeee3 Replace online tests with mocks.
We want to test our code, not the comic modules.
2017-10-15 14:54:44 +02:00
Tobias Gruetzmacher
f1b83748ed When testing the command line, call main method.
Previously, we were spawning the main binary in a subprocess, which is
fragile and interacts poorly with some testing frameworks...
2017-10-15 14:54:44 +02:00
Tobias Gruetzmacher
6de5b79fb8 Switch test to a comic without robots.txt block. 2017-08-11 00:12:07 +02:00
Tobias Gruetzmacher
9a6a310b76 Fixup copyright years. 2016-10-29 00:21:41 +02:00
Tobias Gruetzmacher
ca1c32cf09 Use a more reliable comic for tests. 2016-05-21 16:16:02 +02:00
Tobias Gruetzmacher
efe1308db2 Replace home-grown Python2/3 compat. with six. 2016-05-05 23:33:48 +02:00
Tobias Gruetzmacher
dda920f353 Use py.test's tmpdir fixture. 2016-03-28 16:29:57 +02:00
Tobias Gruetzmacher
2ca74d6e6b Convert all tests to py.test & cleanups. 2016-03-07 01:08:57 +01:00
Tobias Gruetzmacher
41c03af3d9 Don't use SexyLosers for tests.
It's currently broken.
2016-03-04 00:28:05 +01:00
Tobias Gruetzmacher
89ada9de7e Switch tests to a unique comic name. 2015-04-18 12:34:33 +02:00
Bastian Kleineidam
4d63920434 Updated copyright. 2014-01-05 16:50:57 +01:00
Bastian Kleineidam
365fd17802 Fix dosage tests 2014-01-05 14:26:46 +01:00
Bastian Kleineidam
975c7d825b Add documentation. 2013-04-12 21:22:58 +02:00
Bastian Kleineidam
cdbeb65ede Run tests more verbose. 2013-04-05 19:27:36 +02:00
Bastian Kleineidam
181a643f43 Remove deprecated mainline script. 2013-04-02 23:01:07 +02:00
Bastian Kleineidam
e09f1953eb Run mainline tests on windows. 2013-03-29 10:37:09 +01:00
Bastian Kleineidam
be5da7c04b Run mainline tests only on posix systems where symlinks work. 2013-03-26 21:12:02 +01:00
Bastian Kleineidam
69ef34c4e2 Add tests for the old mainline script. 2013-03-12 21:07:32 +01:00
Bastian Kleineidam
dc2e3c807f Fix exit code on errors. 2013-03-11 20:05:06 +01:00
Bastian Kleineidam
7ee73caf3c Allow multiple event output and improve HTML output. 2013-03-11 17:33:59 +01:00
Bastian Kleineidam
bae2a96d8b Added some comic strips and cleanup the scraper code. 2013-03-06 20:00:30 +01:00
Bastian Kleineidam
c13aa323d8 Code cleanup [ci skip] 2013-03-04 21:44:26 +01:00
Bastian Kleineidam
95294d6979 Fix argument parsing of -l, --singlelist and --version. 2013-03-04 19:10:27 +01:00