Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9343447
D3460.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
981 B
Subscribers
None
D3460.diff
View Options
diff --git a/swh/core/api/tests/test_serializers.py b/swh/core/api/tests/test_serializers.py
--- a/swh/core/api/tests/test_serializers.py
+++ b/swh/core/api/tests/test_serializers.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2015-2018 The Software Heritage developers
+# Copyright (C) 2015-2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
@@ -9,6 +9,7 @@
import unittest
from uuid import UUID
+import pytest
import arrow
import requests
import requests_mock
@@ -178,7 +179,7 @@
def test_encode_native_datetime(self):
dt = datetime.datetime(2015, 1, 1, 12, 4, 42, 231455)
- with self.assertRaises(ValueError, match="naive datetime"):
+ with pytest.raises(ValueError, match="naive datetime"):
msgpack_dumps(dt)
def test_decode_naive_datetime(self):
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 1:32 PM (6 d, 6 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3225090
Attached To
D3460: test_serializers: Move to pytest for that specific erratic assertion
Event Timeline
Log In to Comment