diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index e7e9c80f9..000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,24 +0,0 @@ -environment: - matrix: - - # For Python versions available on Appveyor, see - # https://www.appveyor.com/docs/windows-images-software/#python - # Only Python 3.6+ is supported - - - PYTHON: "C:\\Python36" - - PYTHON: "C:\\Python37" - - PYTHON: "C:\\Python36-x64" - - PYTHON: "C:\\Python37-x64" - -install: - # Prepend Python installation and scripts (e.g. pytest) to PATH - - set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH% - - # Install tox - - "pip install tox" - -build: off - -test_script: - # run tests - - "tox -e appveyor" diff --git a/README.rst b/README.rst index 07971b586..b688b8483 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ python-can |release| |python_implementation| |downloads| |downloads_monthly| |formatter| -|docs| |build_travis| |build_appveyor| |coverage| |mergify| +|docs| |build_travis| |coverage| |mergify| .. |release| image:: https://img.shields.io/pypi/v/python-can.svg :target: https://pypi.python.org/pypi/python-can/ @@ -33,10 +33,6 @@ python-can :target: https://travis-ci.com/hardbyte/python-can :alt: Travis CI Server for develop branch -.. |build_appveyor| image:: https://img.shields.io/appveyor/ci/hardbyte/python-can/develop.svg?label=AppVeyor - :target: https://ci.appveyor.com/project/hardbyte/python-can/history - :alt: AppVeyor CI Server for develop branch - .. |coverage| image:: https://codecov.io/gh/hardbyte/python-can/branch/develop/graph/badge.svg :target: https://codecov.io/gh/hardbyte/python-can/branch/develop :alt: Test coverage reports on Codecov.io diff --git a/test/config.py b/test/config.py index f04bf3206..58ad780fc 100644 --- a/test/config.py +++ b/test/config.py @@ -5,7 +5,7 @@ This module contains various configuration for the tests. Some tests are skipped when run on a CI server because they are not -reproducible, see #243 (https://github.com/hardbyte/python-can/issues/243). +reproducible, see for example #243 and #940. """ import platform @@ -20,23 +20,17 @@ def env(name: str) -> bool: # see here for the environment variables that are set on the CI servers: # - https://docs.travis-ci.com/user/environment-variables/ -# - https://www.appveyor.com/docs/environment-variables/ +# - https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables IS_TRAVIS = env("TRAVIS") -IS_APPVEYOR = env("APPVEYOR") IS_GITHUB_ACTIONS = env("GITHUB_ACTIONS") -IS_CI = ( - IS_TRAVIS - or IS_APPVEYOR - or IS_GITHUB_ACTIONS - or env("CI") - or env("CONTINUOUS_INTEGRATION") -) +IS_CI = IS_TRAVIS or IS_GITHUB_ACTIONS or env("CI") or env("CONTINUOUS_INTEGRATION") -if IS_APPVEYOR and IS_TRAVIS and IS_GITHUB_ACTIONS: +if IS_TRAVIS and IS_GITHUB_ACTIONS: raise EnvironmentError( - "only one of IS_APPVEYOR and IS_TRAVIS and GITHUB_ACTIONS may be True at the same time" + f"only one of IS_TRAVIS ({IS_TRAVIS}) and IS_GITHUB_ACTIONS ({IS_GITHUB_ACTIONS}) may be True at the " + "same time" ) @@ -47,19 +41,20 @@ def env(name: str) -> bool: IS_LINUX = "linux" in _sys IS_OSX = "darwin" in _sys IS_UNIX = IS_LINUX or IS_OSX +del _sys if (IS_WINDOWS and IS_LINUX) or (IS_LINUX and IS_OSX) or (IS_WINDOWS and IS_OSX): raise EnvironmentError( - "only one of IS_WINDOWS ({}), IS_LINUX ({}) and IS_OSX ({}) ".format( - IS_WINDOWS, IS_LINUX, IS_OSX - ) - + "can be True at the same time " - + '(platform.system() == "{}")'.format(platform.system()) + f"only one of IS_WINDOWS ({IS_WINDOWS}), IS_LINUX ({IS_LINUX}) and IS_OSX ({IS_OSX}) " + f'can be True at the same time (platform.system() == "{platform.system()}")' ) + # ############################## Implementations + IS_PYPY = platform.python_implementation() == "PyPy" + # ############################## What tests to run TEST_CAN_FD = True diff --git a/test/test_message_sync.py b/test/test_message_sync.py index a20cc9d65..6e6a89a4d 100644 --- a/test/test_message_sync.py +++ b/test/test_message_sync.py @@ -14,7 +14,7 @@ from can import MessageSync, Message -from .config import IS_CI, IS_APPVEYOR, IS_TRAVIS, IS_OSX, IS_GITHUB_ACTIONS, IS_LINUX +from .config import IS_CI, IS_TRAVIS, IS_OSX, IS_GITHUB_ACTIONS, IS_LINUX from .message_helper import ComparingMessagesTestCase from .data.example_data import TEST_MESSAGES_BASE @@ -31,7 +31,7 @@ def inc(value): skip_on_unreliable_platforms = unittest.skipIf( - IS_APPVEYOR or (IS_TRAVIS and IS_OSX) or (IS_GITHUB_ACTIONS and not IS_LINUX), + (IS_TRAVIS and IS_OSX) or (IS_GITHUB_ACTIONS and not IS_LINUX), "this environment's timings are too unpredictable", ) diff --git a/tox.ini b/tox.ini index 46bb17456..a29c3cafe 100644 --- a/tox.ini +++ b/tox.ini @@ -31,17 +31,6 @@ passenv = TRAVIS_* TEST_SOCKETCAN -commands_post = - codecov -X gcov - -[testenv:appveyor] -passenv = - CI - APPVEYOR - APPVEYOR_* - -extras = neovi - commands_post = codecov -X gcov