OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python311
/
lib
/
python3.11
/
site-packages
/
tests
/
functions
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/14/2024 03:19:10 PM
rwxr-xr-x
📄
__init__.py
0 bytes
05/14/2024 03:18:36 PM
rw-r--r--
📁
__pycache__
-
05/14/2024 03:18:36 PM
rwxr-xr-x
📄
test_common_ancestor.py
1.24 KB
05/14/2024 03:18:36 PM
rw-r--r--
📄
test_get_args_and_return_type.py
1.26 KB
05/14/2024 03:18:36 PM
rw-r--r--
📄
test_get_mro.py
779 bytes
05/14/2024 03:18:36 PM
rw-r--r--
📄
test_get_type.py
3.42 KB
05/14/2024 03:18:36 PM
rw-r--r--
📄
test_get_type_hints_of_callable.py
1.64 KB
05/14/2024 03:18:36 PM
rw-r--r--
📄
test_instance_of.py
5.61 KB
05/14/2024 03:18:36 PM
rw-r--r--
📄
test_is_optional_type.py
553 bytes
05/14/2024 03:18:36 PM
rw-r--r--
📄
test_is_type_annotation.py
1.03 KB
05/14/2024 03:18:36 PM
rw-r--r--
📄
test_origin_and_alias.py
1.97 KB
05/14/2024 03:18:36 PM
rw-r--r--
📄
test_subclass_of.py
4.24 KB
05/14/2024 03:18:36 PM
rw-r--r--
Editing: test_get_mro.py
Close
import typing from typing import Union from unittest import TestCase from typish import get_mro class A: ... class B(A): ... class TestGetMRO(TestCase): def test_get_mro(self): mro_b = get_mro(B) self.assertTupleEqual((B, A, object), mro_b) def test_get_mro_union(self): mro_u = get_mro(Union[int, str]) # Below is to stay compatible with Python 3.5+ super_cls = getattr(typing, '_GenericAlias', getattr(typing, 'GenericMeta', None)) expected = (typing.Union, super_cls, object) self.assertTupleEqual(expected, mro_u) def test_get_mro_object(self): mro_b = get_mro(B()) self.assertTupleEqual((B, A, object), mro_b)