diff options
Diffstat (limited to 'test/netlib/test_encoding.py')
-rw-r--r-- | test/netlib/test_encoding.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/netlib/test_encoding.py b/test/netlib/test_encoding.py index 797abff2..e1175ef0 100644 --- a/test/netlib/test_encoding.py +++ b/test/netlib/test_encoding.py @@ -4,9 +4,13 @@ import pytest from netlib import encoding, tutils -def test_identity(): - assert b"string" == encoding.decode(b"string", "identity") - assert b"string" == encoding.encode(b"string", "identity") +@pytest.mark.parametrize("encoder", [ + 'identity', + 'none', +]) +def test_identity(encoder): + assert b"string" == encoding.decode(b"string", encoder) + assert b"string" == encoding.encode(b"string", encoder) with tutils.raises(ValueError): encoding.encode(b"string", "nonexistent encoding") |