Vajrasky Kok added the comment: 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19353> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com