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.
Created on 2013年10月22日 17:14 by mcepl, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue19353.patch | christian.heimes, 2013年10月22日 19:10 | review | ||
| Messages (9) | |||
|---|---|---|---|
| msg200973 - (view) | Author: Matej Cepl (mcepl) * | Date: 2013年10月22日 17:14 | |
With pure clone of https://github.com/python/cpython.git (no patches applied whatsoever, and the last commit is https://github.com/python/cpython/commit/650406fe7373f31b595b381d4f2f02065607386a) and pure ./configure && make -j2 && make -j2 test I get one failed test: ====================================================================== ERROR: test_linux_constants (test.test_resource.ResourceTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/matej/Repos/cpython/Lib/test/test_resource.py", line 139, in test_linux_constants self.assertIsInstance(resource.RLIMIT_RTTIME, int) AttributeError: 'module' object has no attribute 'RLIMIT_RTTIME' ---------------------------------------------------------------------- Ran 9 tests in 0.468s FAILED (errors=1, skipped=1) test test_resource failed make: *** [test] Error 1 |
|||
| msg200977 - (view) | Author: Stefan Krah (skrah) * (Python committer) | Date: 2013年10月22日 18:04 | |
Christian, could you have a look? I think this was added in #19324. |
|||
| msg200979 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2013年10月22日 18:43 | |
What's the output of "uname -r" on your machine? |
|||
| msg200981 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2013年10月22日 19:10 | |
Patch with fix. I'm checking the kernel version manually. requires_linux_version() works only per test. I don't want to write a test case for each attribute ... |
|||
| msg200993 - (view) | Author: Vajrasky Kok (vajrasky) * | Date: 2013年10月23日 02:30 | |
Do we really need to test these constants in unit test? Other constants such as RLIMIT_STACK, RLIMIT_DATA, etc are not being tested. Other consideration includes people built custom kernel without these constants, or maybe they have outdated glibc. Additionally, it is very uncommon to use os.uname in unittest. Other than this test, it is only Lib/test/test_locale.py that uses os.uname. |
|||
| msg200994 - (view) | Author: Vajrasky Kok (vajrasky) * | Date: 2013年10月23日 02:45 | |
Or if we really want to test these constants, we can use something like this: if hasattr(resource, 'RLIMIT_NICE'): self.assertIsInstance(resource.RLIMIT_NICE, int) Or if we want to be so strict: if hasattr(resource, 'RLIMIT_NICE'): self.assertTrue(-20 <= resource.RLIMIT_NICE <= 19) Reference: http://man7.org/conf/lca2006/Linux_2.6_changes/rlimit_5.html RLIMIT_NICE (2.6.12) Process nice value has range -20 (high) to +19 (low); influences kernel scheduler. |
|||
| msg200998 - (view) | Author: Matej Cepl (mcepl) * | Date: 2013年10月23日 05:50 | |
On 22/10/13 20:43, Christian Heimes wrote: > Christian Heimes added the comment: > > What's the output of "uname -r" on your machine? 2.6.32-358.23.2.el6.i686 |
|||
| msg201333 - (view) | Author: Vajrasky Kok (vajrasky) * | Date: 2013年10月26日 10:27 | |
This issue has been accidentally fixed by http://hg.python.org/cpython/rev/513da56d28de commit. Time to close it? Any last words? |
|||
| msg201353 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2013年10月26日 13:23 | |
Since the test now passes I'm going to close this as fixed. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:52 | admin | set | github: 63552 |
| 2013年10月26日 13:23:44 | brett.cannon | set | status: open -> closed messages: + msg201353 assignee: brett.cannon resolution: fixed stage: patch review -> resolved |
| 2013年10月26日 10:27:35 | vajrasky | set | nosy:
+ brett.cannon messages: + msg201333 |
| 2013年10月23日 05:50:19 | mcepl | set | messages: + msg200998 |
| 2013年10月23日 02:45:16 | vajrasky | set | messages: + msg200994 |
| 2013年10月23日 02:30:29 | vajrasky | set | nosy:
+ vajrasky messages: + msg200993 |
| 2013年10月22日 19:10:15 | christian.heimes | set | files:
+ issue19353.patch components: + Tests versions: + Python 3.4 keywords: + patch type: behavior messages: + msg200981 stage: patch review |
| 2013年10月22日 18:43:50 | christian.heimes | set | messages: + msg200979 |
| 2013年10月22日 18:04:30 | skrah | set | nosy:
+ skrah, christian.heimes messages: + msg200977 |
| 2013年10月22日 17:14:26 | mcepl | create | |