File: test_typing.py

package info (click to toggle)
nanobind 2.11.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,300 kB
  • sloc: cpp: 12,232; python: 6,315; ansic: 4,813; makefile: 22; sh: 15
file content (12 lines) | stat: -rw-r--r-- 385 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
import test_typing_ext as t
import sys
import pytest
import platform

def test01_parameterize_generic():
    assert str(type(t.Wrapper[int]) == 't.Wrapper[int]')
    if platform.python_implementation() != 'PyPy':
        assert issubclass(t.WrapperFoo, t.Wrapper)
        assert t.WrapperFoo.__bases__ == (t.Wrapper,)
        assert t.WrapperFoo.__orig_bases__ == (t.Wrapper[t.Foo],)