File: dont-count-DeprecationWarnings.patch

package info (click to toggle)
joblib 1.4.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,360 kB
  • sloc: python: 14,772; sh: 138; makefile: 42
file content (18 lines) | stat: -rw-r--r-- 775 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Don't count DeprecationWarnings
Forwarded: https://github.com/joblib/joblib/issues/1478
Author: Miro HronĨok <miro@hroncok.cz>
Last-Update: 2023-07-04

--- a/joblib/test/test_parallel.py
+++ b/joblib/test/test_parallel.py
@@ -193,6 +193,10 @@
     # warninfo catches Warnings from worker timeouts. We remove it if it exists
     warninfo = [w for w in warninfo if "worker timeout" not in str(w.message)]
 
+    # We don't want to count DeprecationWarnings
+    warninfo = [w for w in warninfo
+                if not isinstance(w.message, DeprecationWarning)]
+
     # The multiprocessing backend will raise a warning when detecting that is
     # started from the non-main thread. Let's check that there is no false
     # positive because of the name change.