Commit Graph

56 Commits

Author SHA1 Message Date
Valentin Lorentz
314fad36eb Modernize tests
Thanks to https://pypi.org/project/teyit/
2022-11-20 19:33:23 +01:00
Valentin Lorentz
fccb4f705b RSS: Log feed URL when feedparser.parse raises exceptions 2022-08-07 19:17:15 +02:00
Valentin Lorentz
63eb6672ea Revert generic 'The Limnoria Contributors' in copyright notices
This commit reverts db7ef3f025
(though it keeps the year updates)

After discussion with several people, it seems better to mention
copyright owners explicitly. eg. https://reuse.software/faq/#vcs-copyright
explains the issue of using VCSs to track copyright.

As db7ef3f025 only replaced mentions
of my name with 'The Limnoria Contributors', this commit only needs
to undo that + add one person who contributed to setup.py.
2021-10-17 09:57:55 +02:00
Valentin Lorentz
dc79ab193a Update capitalization of my Github username 2021-09-14 20:30:47 +02:00
Valentin Lorentz
ca624d7ae6 RSS: Fix nondeterministic test failures
Caused by 'rss announce add' triggering headline announces, that would
delay the execution of the 'remove' commands.

Thanks to @mapreri and @Unit193 for help in reproducing the issue
and confirming the patch.
2021-08-22 19:23:05 +02:00
Valentin Lorentz
0c8e455b4e RSS: When deleting a named feed, preserve anonymous feed of the same URL. 2021-08-22 19:21:28 +02:00
Valentin Lorentz
db7ef3f025 all: Add generic 'The Limnoria Contributors' to copyright notices.
No need to bother with details (that are all outdated / out of sync
anyway), just look up the git history.
2021-08-01 21:54:49 +02:00
Valentin Lorentz
0af4af16d3 RSS: Fix random test failure
Closes GH-1479
2021-07-04 10:46:51 +02:00
Valentin Lorentz
2e2c243b8b RSS: Remove flaky test 2021-05-28 19:37:37 +02:00
Valentin Lorentz
b8852eb9f3 RSS: Fix nondeterministic test failure 2021-05-28 19:15:56 +02:00
Valentin Lorentz
3415cd08a1 RSS: Add test checking exception from a feed doesn't affect other feeds. 2021-05-28 18:38:06 +02:00
Valentin Lorentz
7c68b2cb53 RSS: Fix crash in @rss list 2021-05-28 17:56:59 +02:00
Valentin Lorentz
97a7aa304e RSS: Make @remove completely clean up feeds 2021-05-01 14:29:09 +02:00
Valentin Lorentz
435f8de73a RSS: Fix bug in @remove that prevented it from fully deleting aliased feeds. 2021-05-01 13:27:56 +02:00
Valentin Lorentz
0102d64cf4 RSS: fix tests with feedparser 6.
Mocks the urllib API it uses instead of an internal function.
2020-09-19 10:15:23 +02:00
Valentin Lorentz
2953126fca test: Make assertNoResponse default to a non-zero timeout for threaded plugins.
Else it doesn't reliably check there is no response.
2020-04-11 00:17:16 +02:00
Valentin Lorentz
9891b0fca4 Replace failUnless/failIf with assertTrue/assertFalse.
The old names are deprecated.
2020-01-26 11:14:18 +01:00
James Lu
3c23faf1bd RSS: add 'announce channels' command to list channels a feed is announced to
Closes #1322.
2019-10-06 20:46:21 +02:00
Valentin Lorentz
dcf55cf6de RSS: Use an explicit timeout for assertNoResponse, because it defaults to 0.
Which means there may be a command/update thread running and returning after assertNoResponse returns.
In particular, that's an issue when assertNoResponse is called right before
setting feedparser._open_resource, because the running thread might still
be holding the lock but have fetched the new version already, so the
thread announces the new feed elements earlier than expected.
2019-10-05 15:57:01 +02:00
Valentin Lorentz
a4665803fa News + RSS: Mock time.time() instead of using time.sleep() in tests.
Saves 40s over the ~5min test suite.
2019-10-05 12:22:30 +02:00
James Lu
c7716de887 RSS: add a quick test for a malformed feed that has no entries
(Only both of these combined gives new output so far.)
2018-10-14 12:42:15 -07:00
Valentin Lorentz
3ab226c129 RSS: Only defer feed loading at plugin load while the bot is starting.
Defering it if the plugin is (re)loaded while already running is useless.
Closes GH-922.
2017-12-10 09:39:20 +01:00
Valentin Lorentz
e08e899134 Fix test 2017-10-21 17:11:21 +02:00
Valentin Lorentz
e16faab805 RSS: On startup, only delay feeds loading for 10 seconds instead of the whole of supybot.plugins.RSS.waitPeriod. 2017-10-21 16:48:44 +02:00
Valentin Lorentz
eaa5a5523e RSS: Add var supybot.plugins.RSS.maximumAnnounceHeadlines. 2017-10-12 21:21:50 +02:00
Valentin Lorentz
3633a2b2e3 RSS: Only keep the most recent entries in the initial announce. 2017-01-27 21:00:58 +01:00
Valentin Lorentz
4f280599e1 RSS: use the original FeedParserDict for substitution
instead of building a new keyword arguments dict by iteration.

'description' is a field in FeedParserDict, but is not present when iterating,
which made it unavailable as a substitution variable.
2016-09-08 21:42:31 +02:00
Valentin Lorentz
fb52b16429 RSS: Allow @announce add to take URLs as feed names. 2015-10-10 20:40:25 +02:00
Valentin Lorentz
82332ff87c RSS: Add feed-specific waitPeriod. 2015-09-23 11:05:25 +02:00
Valentin Lorentz
29ca3eb5e4 RSS: Sort on time tuples instead of formatted dates. 2015-09-02 09:43:29 +02:00
Valentin Lorentz
c3a2c800f1 Remove need for 2to3. 2015-08-11 16:50:23 +02:00
Valentin Lorentz
c0ac84bb53 Remove need for fix_import, fix_types, and fix_urllib. 2015-08-10 17:55:25 +02:00
Valentin Lorentz
216c5d213f Replace sys.version_info[0] usages with minisix.PY{2,3}. 2015-08-09 00:23:03 +02:00
Valentin Lorentz
aa89a2dd72 Trying to make the tests fail less… 2015-01-05 20:39:22 +01:00
Valentin Lorentz
d2046a81a2 RSS: Prevent errors if users do not use @announce add correctly. Closes GH-869. 2014-10-10 14:41:45 +00:00
Valentin Lorentz
c08a480f11 RSS: Honor supybot.plugins.RSS.initialAnnounceHeadlines. 2014-08-13 16:43:43 +02:00
Valentin Lorentz
db50e65b86 RSS: Fix tests for Python 3. 2014-08-01 00:16:36 +02:00
Valentin Lorentz
057da44ab3 RSS: Make sure two different feeds cannot have the same URL. 2014-07-31 23:56:27 +02:00
Valentin Lorentz
3a127e884e RSS: Allow feed-specific format. Closes GH-104. 2014-07-31 23:50:43 +02:00
Valentin Lorentz
7ac053d8f1 Merge branch 'rewrite-rss' into testing 2014-07-31 22:53:44 +02:00
Valentin Lorentz
b5911f8489 RSS: Implement persistence of announced headlines. 2014-07-31 22:53:21 +02:00
Valentin Lorentz
809a34a9ad RSS: Fix test broken by 2caade8f. 2014-07-31 20:12:59 +02:00
Valentin Lorentz
a5c928b364 RSS: Fix test broken by 2caade8f. 2014-07-31 20:12:37 +02:00
Valentin Lorentz
2f327ab9c1 Fix Python 2.6 support (broken in the two last commits). 2014-07-31 18:06:20 +00:00
Valentin Lorentz
7057112d2d RSS: Add tests for announce. 2014-07-30 22:00:20 +00:00
James McCoy
aa4071fa68 RSS: Remove local/feedparser and add it to install_requires
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-10-14 12:13:00 -04:00
James McCoy
82ecf36fcd Update my name/contact information
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
2012-09-01 10:16:48 -04:00
James Vega
62acb0c998 Make RSS.announce a nested plugin
This simplifies the interface for dealing with announced feeds by providing
separate "announce add", "announce remove", "announce list" commands as
opposed to the one "announce" command with confusing syntax.

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
2009-02-28 00:10:10 -05:00
James Vega
6722a856d8 plugins/RSS/test.py: A missing step in testAnnounce was causing other tests to unexpectedly fail. 2006-05-01 17:49:37 +00:00
James Vega
53e88a67c2 plugins/RSS/test.py: Remove a comment that doesn't apply anymore and add a test for another encoding problem. 2006-04-06 15:00:53 +00:00