Skip to content

Commit 2eeb629

Browse files
committed
Suppress warning in test_json_dump.
1 parent 99dd224 commit 2eeb629

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import pickle
44
import textwrap
55
import unittest
6+
import warnings
67
import importlib
78
import importlib_metadata
89
import pyfakefs.fake_filesystem_unittest as ffs
@@ -247,7 +248,8 @@ def test_json_dump(self):
247248
json should not expect to be able to dump an EntryPoint
248249
"""
249250
with self.assertRaises(Exception):
250-
json.dumps(self.ep)
251+
with warnings.catch_warnings(record=True):
252+
json.dumps(self.ep)
251253

252254
def test_module(self):
253255
assert self.ep.module == 'value'

0 commit comments

Comments
 (0)