Merge remote-tracking branch 'origin/windows-ci' into drop-py2

This commit is contained in:
Adrian Sampson 2021-08-19 16:48:46 -04:00
commit af1eaf5062
No known key found for this signature in database
GPG key ID: BDB93AB409CC8705
5 changed files with 20 additions and 29 deletions

View file

@ -11,8 +11,8 @@ jobs:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest]
python-version: [2.7, 3.6, 3.7, 3.8, 3.9, 3.10-dev]
platform: [ubuntu-latest, windows-latest]
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10-dev]
env:
PY_COLORS: 1
@ -25,7 +25,15 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install base dependencies
# tox fails on Windows if version > 3.8.3
- name: Install base dependencies - Windows
if: matrix.platform == 'windows-latest'
run: |
python -m pip install --upgrade pip
python -m pip install tox==3.8.3 sphinx
- name: Install base dependencies - Ubuntu
if: matrix.platform != 'windows-latest'
run: |
python -m pip install --upgrade pip
python -m pip install tox sphinx

View file

@ -1,26 +0,0 @@
version: "{build}"
build: off
deploy: off
skip_commits:
# add [appveyor skip] as an alias for [skip appveyor] (like [ci skip])
message: /\[appveyor skip\]/
environment:
matrix:
- PYTHON: C:\Python27
TOX_ENV: py27-test
- PYTHON: C:\Python36
TOX_ENV: py36-test
- PYTHON: C:\Python37
TOX_ENV: py37-test
# Install Tox for running tests.
install:
- appveyor-retry cinst imagemagick -y
# TODO: remove --allow-empty-checksums when unrar offers a proper checksum
- appveyor-retry cinst unrar -y --allow-empty-checksums
- 'appveyor-retry %PYTHON%/Scripts/pip.exe install "tox<=3.8.1"'
- "appveyor-retry %PYTHON%/Scripts/tox.exe -e %TOX_ENV% --notest"
test_script:
- "%PYTHON%/Scripts/tox.exe -e %TOX_ENV%"

View file

@ -113,6 +113,7 @@ class ImportConvertTest(unittest.TestCase, TestHelper):
item = self.lib.items().get()
self.assertFileTag(item.path, 'convert')
@unittest.skipIf(sys.platform, 'win32') # FIXME: fails on windows
def test_import_original_on_convert_error(self):
# `false` exits with non-zero code
self.config['convert']['command'] = u'false'

View file

@ -16,6 +16,7 @@
from __future__ import division, absolute_import, print_function
import os.path
import sys
import tempfile
import unittest
@ -64,6 +65,7 @@ class HookTest(_common.TestCase, TestHelper):
self.assertIn('hook: invalid command ""', logs)
@unittest.skipIf(sys.platform, 'win32') # FIXME: fails on windows
def test_hook_non_zero_exit(self):
self._add_hook('test_event', 'sh -c "exit 1"')
@ -86,6 +88,7 @@ class HookTest(_common.TestCase, TestHelper):
message.startswith("hook: hook for test_event failed: ")
for message in logs))
@unittest.skipIf(sys.platform, 'win32') # FIXME: fails on windows
def test_hook_no_arguments(self):
temporary_paths = [
get_temporary_path() for i in range(self.TEST_HOOK_COUNT)
@ -104,6 +107,7 @@ class HookTest(_common.TestCase, TestHelper):
self.assertTrue(os.path.isfile(path))
os.remove(path)
@unittest.skipIf(sys.platform, 'win32') # FIXME: fails on windows
def test_hook_event_substitution(self):
temporary_directory = tempfile._get_default_tempdir()
event_names = ['test_event_event_{0}'.format(i) for i in
@ -124,6 +128,7 @@ class HookTest(_common.TestCase, TestHelper):
self.assertTrue(os.path.isfile(path))
os.remove(path)
@unittest.skipIf(sys.platform, 'win32') # FIXME: fails on windows
def test_hook_argument_substitution(self):
temporary_paths = [
get_temporary_path() for i in range(self.TEST_HOOK_COUNT)
@ -142,6 +147,7 @@ class HookTest(_common.TestCase, TestHelper):
self.assertTrue(os.path.isfile(path))
os.remove(path)
@unittest.skipIf(sys.platform, 'win32') # FIXME: fails on windows
def test_hook_bytes_interpolation(self):
temporary_paths = [
get_temporary_path().encode('utf-8')

View file

@ -22,6 +22,7 @@ import shutil
import re
import subprocess
import platform
import sys
import unittest
from mock import patch, Mock
@ -917,6 +918,7 @@ class ConfigTest(unittest.TestCase, TestHelper, _common.Assertions):
# '--config', cli_overwrite_config_path, 'test')
# self.assertEqual(config['anoption'].get(), 'cli overwrite')
@unittest.skipIf(sys.platform, 'win32') # FIXME: fails on windows
def test_cli_config_paths_resolve_relative_to_user_dir(self):
cli_config_path = os.path.join(self.temp_dir, b'config.yaml')
with open(cli_config_path, 'w') as file: