self = def test_encode_native_datetime(self): dt = datetime.datetime(2015, 1, 1, 12, 4, 42, 231455) > with self.assertRaises(ValueError, matches="naive datetime"): E TypeError: 'matches' is an invalid keyword argument for this function swh/core/api/tests/test_serializers.py:181: TypeError