← 输入框|bugs.python.org|刷新

➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 sobolevn
收信人 sobolevn
日期 2022-01-17.15:22:26
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1642432946.92.0.224502612065.issue46416@roundup.psfhosted.org>
In-reply-to
内容
Here's the problem:

```
» ./python.exe Lib/test/test_typing.py
........................................................................................................................................................................................................s.....................................................................................................................F.........................................................................................
======================================================================
FAIL: test_special_attrs2 (__main__.SpecialAttrsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/sobolev/Desktop/cpython/Lib/test/test_typing.py", line 5068, in test_special_attrs2
    self.assertEqual(
    ^^^^^^^^^^^^^^^^^
AssertionError: '__main__' != 'test.test_typing'
- __main__
+ test.test_typing
```

I think it is a good idea to use the same hack we have in `test_enum.py`: https://github.com/python/cpython/blob/83d544b9292870eb44f6fca37df0aa351c4ef83a/Lib/test/test_enum.py#L34

```python
MODULE = ('test.test_typing', '__main__')[__name__=='__main__']
```

PR is on its way :)
历史
日期 用户 动作 参数
2022-01-17 15:22:26sobolevn修改recipients: + sobolevn
2022-01-17 15:22:26sobolevn修改messageid: <1642432946.92.0.224502612065.issue46416@roundup.psfhosted.org>
2022-01-17 15:22:26sobolevn链接issue46416 messages
2022-01-17 15:22:26sobolevn创建