New submission from Nikita Sobolev <m...@sobolevn.me>:

Today I've noticed that these two methods are not covered: 
https://github.com/python/cpython/blame/16901c0482734dbd389b09ca3edfcf3e22faeed7/Lib/typing.py#L1028-L1032

- `typing._GenericAlias.__or__`
- `typing._GenericAlias.__ror__`

Later, I've realized that these two methods are not covered as well: 
https://github.com/python/cpython/blame/16901c0482734dbd389b09ca3edfcf3e22faeed7/Lib/typing.py#L1149-L1153

- `typing._SpecialGenericAlias.__or__`
- `typing._SpecialGenericAlias.__ror__`

My test plan is:
1. Cover regular `_GenericAlias` with `|` operation
2. Cover some `_SpecialGeneriAlias` instances like `Sized` and `Hashable`
3. Cover `Callable` and `Tuple` types, because they are a special-cased 
subtypes of `_SpecialGeneriAlias`

PR is on its way.

----------
components: Tests
messages: 410792
nosy: sobolevn
priority: normal
severity: normal
status: open
title: `__or__` is not covered for `_GenericAlias` and `_SpecialGenericAlias` 
in `typing`
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46413>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to