1""" 2These test cases verify ansible-test version constraints for pylint and its dependencies across Python versions. 3The initial test cases were discovered while testing various Python versions against ansible/ansible. 4""" 5from __future__ import absolute_import, division, print_function 6__metaclass__ = type 7 8# Python 3.8 fails with astroid 2.2.5 but works on 2.3.3 9# syntax-error: Cannot import 'string' due to syntax error 'invalid syntax (<unknown>, line 109)' 10# Python 3.9 fails with astroid 2.2.5 but works on 2.3.3 11# syntax-error: Cannot import 'string' due to syntax error 'invalid syntax (<unknown>, line 104)' 12import string 13 14# Python 3.9 fails with pylint 2.3.1 or 2.4.4 with astroid 2.3.3 but works with pylint 2.5.0 and astroid 2.4.0 15# 'Call' object has no attribute 'value' 16result = {None: None}[{}.get('something')] 17 18# pylint 2.3.1 and 2.4.4 report the following error but 2.5.0 and 2.6.0 do not 19# blacklisted-name: Black listed name "foo" 20# see: https://github.com/PyCQA/pylint/issues/3701 21# regression: documented as a known issue and removed from ignore.txt so pylint can be upgraded to 2.6.0 22# if future versions of pylint fix this issue then the ignore should be restored 23foo = {}.keys() 24