[issue46327] `test_enum` contains tests for older versions of python

2022-01-10 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46327] `test_enum` contains tests for older versions of python

2022-01-10 Thread Ethan Furman


Ethan Furman  added the comment:


New changeset 13e4659276c2af2fa5b0f2b3a31dcd69064868ef by Nikita Sobolev in 
branch 'main':
bpo-46327: [Enum] remove skipped tests (GH-30512)
https://github.com/python/cpython/commit/13e4659276c2af2fa5b0f2b3a31dcd69064868ef


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46327] `test_enum` contains tests for older versions of python

2022-01-10 Thread Alex Waygood


Change by Alex Waygood :


--
assignee:  -> ethan.furman

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46327] `test_enum` contains tests for older versions of python

2022-01-10 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
keywords: +patch
pull_requests: +28715
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30512

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46327] `test_enum` contains tests for older versions of python

2022-01-10 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

On the other hand second test 

```python
@unittest.skipUnless(python_version >= (3, 9),
 '_convert was removed in 3.9')
def test_convert_raise(self):
with self.assertRaises(AttributeError):
enum.IntEnum._convert(
'UnittestConvert',
MODULE,
filter=lambda x: x.startswith('CONVERT_TEST_'))
```

can also be removed if needed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46327] `test_enum` contains tests for older versions of python

2022-01-10 Thread Nikita Sobolev


New submission from Nikita Sobolev :

Here's the problem: 
https://github.com/python/cpython/blob/main/Lib/test/test_enum.py#L4515-L4531

Why it is a problem?
1. First test is marked as `@unittest.skipUnless(python_version == (3, 8)`. 
Which means it is only executed on `3.8`. I think it should be removed from 
more recent branches
2. Second test is marked as `@unittest.skipUnless(python_version >= (3, 9)`. 
Which means that it will be executed on three currently supported branches. I 
think we can remove this decorator

I will send a PR today.

--
components: Tests
messages: 410194
nosy: ethan.furman, sobolevn
priority: normal
severity: normal
status: open
title: `test_enum` contains tests for older versions of python
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com