diff --git a/.flake8 b/.flake8 index 063a6da..c31f9e8 100644 --- a/.flake8 +++ b/.flake8 @@ -4,6 +4,10 @@ max-complexity = 10 ignore = E126, E501, + E741, + E722, F401, F811, - C901 + C901, + W503, + W504 diff --git a/.travis.yml b/.travis.yml index 3ea7580..c0b9447 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ sudo: false language: python python: -- '2.7' -- '3.5' - '3.6' +- '3.7' +- '3.8' install: pip install tox-travis script: tox deploy: diff --git a/requirements.txt b/requirements.txt index 30f6d1d..247ba6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,12 @@ -argcomplete==1.8.2 -colorama==0.3.9 -flake8==3.2.1 -jmespath==0.9.2 -mock==2.0.0 -pylint==1.9.4; python_version <= '2.7' -pylint==2.3.1; python_version >= '3.5' -pygments==2.2.0 -pyyaml==3.12 -six==1.10.0 -tabulate==0.7.7 -vcrpy==1.10.3 -pytest==4.6.6 +argcomplete==1.11.1 +colorama==0.4.3 +flake8==3.7.9 +jmespath==0.9.4 +mock==4.0.1 +pylint==2.3.0 +Pygments==2.5.2 +PyYAML==5.3 +six==1.14.0 +tabulate==0.8.6 +vcrpy==4.0.2 +pytest==5.3.5 diff --git a/setup.py b/setup.py index 5f1c1ab..6c18bc4 100644 --- a/setup.py +++ b/setup.py @@ -39,12 +39,11 @@ 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], packages=['knack', 'knack.testsdk'], diff --git a/tests/test_config.py b/tests/test_config.py index aa49dd3..bf71f48 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -186,13 +186,15 @@ def test_set_config_value_file_permissions(self): file_mode = os.stat(self.cli_config.config_path).st_mode self.assertTrue(bool(file_mode & stat.S_IRUSR)) self.assertTrue(bool(file_mode & stat.S_IWUSR)) - self.assertFalse(bool(file_mode & stat.S_IXUSR)) - self.assertFalse(bool(file_mode & stat.S_IRGRP)) - self.assertFalse(bool(file_mode & stat.S_IWGRP)) - self.assertFalse(bool(file_mode & stat.S_IXGRP)) - self.assertFalse(bool(file_mode & stat.S_IROTH)) - self.assertFalse(bool(file_mode & stat.S_IWOTH)) - self.assertFalse(bool(file_mode & stat.S_IXOTH)) + # only S_IRUSR and S_IWUSR are supported on Windows: https://docs.python.org/3.8/library/os.html#os.chmod + if os.name != 'nt': + self.assertFalse(bool(file_mode & stat.S_IXUSR)) + self.assertFalse(bool(file_mode & stat.S_IRGRP)) + self.assertFalse(bool(file_mode & stat.S_IWGRP)) + self.assertFalse(bool(file_mode & stat.S_IXGRP)) + self.assertFalse(bool(file_mode & stat.S_IROTH)) + self.assertFalse(bool(file_mode & stat.S_IWOTH)) + self.assertFalse(bool(file_mode & stat.S_IXOTH)) def test_has_option_local(self): section = 'MySection' diff --git a/tox.ini b/tox.ini index dad6730..95c8a67 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py35,py36,py37 +envlist = py36,py37,py38 [testenv] deps = -rrequirements.txt commands=