unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 5cff57e94c27ad0e49afef3ffa675fb6e395f4ab 1228 bytes (raw)
name: packages/patches/python-dateutil-pytest-compat.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 
Add compatibility with newer versions of pytest.

Taken from upstream:

  https://github.com/dateutil/dateutil/commit/2bdd63158b7f981fc6d70a869680451bdfd8d848

diff --git a/dateutil/test/test_internals.py b/dateutil/test/test_internals.py
index 53081314..b32e6723 100644
--- a/dateutil/test/test_internals.py
+++ b/dateutil/test/test_internals.py
@@ -9,6 +9,7 @@
 
 import sys
 import pytest
+import warnings
 
 from dateutil.parser._parser import _ymd
 from dateutil import tz
@@ -65,18 +66,17 @@ def test_parser_parser_private_not_warns():
     from dateutil.parser._parser import _timelex, _tzparser
     from dateutil.parser._parser import _parsetz
 
-    with pytest.warns(None) as recorder:
+    with warnings.catch_warnings():
+        warnings.simplefilter("error")
         _tzparser()
-        assert len(recorder) == 0
 
-    with pytest.warns(None) as recorder:
+    with warnings.catch_warnings():
+        warnings.simplefilter("error")
         _timelex('2014-03-03')
 
-        assert len(recorder) == 0
-
-    with pytest.warns(None) as recorder:
+    with warnings.catch_warnings():
+        warnings.simplefilter("error")
         _parsetz('+05:00')
-        assert len(recorder) == 0
 
 
 @pytest.mark.tzstr

debug log:

solving 5cff57e94c27ad0e49afef3ffa675fb6e395f4ab ...
found 5cff57e94c27ad0e49afef3ffa675fb6e395f4ab in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).