File: errors_test.py

package info (click to toggle)
python-josepy 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 484 kB
  • sloc: python: 2,534; makefile: 27
file content (20 lines) | stat: -rw-r--r-- 506 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
"""Tests for josepy.errors."""

import sys
import unittest

import pytest


class UnrecognizedTypeErrorTest(unittest.TestCase):
    def setUp(self) -> None:
        from josepy.errors import UnrecognizedTypeError

        self.error = UnrecognizedTypeError("foo", {"type": "foo"})

    def test_str(self) -> None:
        assert "foo was not recognized, full message: {'type': 'foo'}" == str(self.error)


if __name__ == "__main__":
    sys.exit(pytest.main(sys.argv[1:] + [__file__]))  # pragma: no cover