File: test_wrap.py

package info (click to toggle)
aiofiles 25.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 324 kB
  • sloc: python: 1,791; makefile: 3; sh: 1
file content (13 lines) | stat: -rw-r--r-- 321 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
from io import FileIO

import pytest

from aiofiles.threadpool import wrap


@pytest.mark.parametrize("entity", [int, [1, 2, 3], lambda x: x**x, FileIO])
def test_threadpool_wrapper_negative(entity):
    """Raising TypeError when wrapping unsupported entities."""

    with pytest.raises(TypeError):
        wrap(entity)