Azure Pipelines - tests for windows (#538)

* add azure-pipelines.yml

* fix install command

* skip some tests on windows
This commit is contained in:
Samuel Colvin
2019-05-23 10:30:32 +01:00
committed by GitHub
parent cd8c7641bf
commit 66ce99e4f0
3 changed files with 37 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
pool:
vmImage: 'windows-2019'
strategy:
matrix:
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
pip install --user -U setuptools pip
pip install --user -U -r requirements.txt
pip install --user -e .
pip freeze
displayName: install
- script: make test
displayName: test
- script: make lint
displayName: lint
- script: make mypy
displayName: mypy
+2
View File
@@ -1,5 +1,6 @@
import datetime
import json
import sys
from decimal import Decimal
from enum import Enum
from ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network
@@ -53,6 +54,7 @@ def test_encoding(input, output):
assert output == json.dumps(input, default=pydantic_encoder)
@pytest.mark.skipif(sys.platform.startswith('win'), reason='paths look different on windows')
def test_path_encoding(tmpdir):
class PathModel(BaseModel):
path: Path
+2
View File
@@ -1,4 +1,5 @@
import os
import sys
import uuid
from collections import OrderedDict
from datetime import date, datetime, time, timedelta
@@ -1197,6 +1198,7 @@ def test_directory_path_validation_success(value, result):
assert Model(foo=value).foo == result
@pytest.mark.skipif(sys.platform.startswith('win'), reason='paths look different on windows')
@pytest.mark.parametrize(
'value,errors',
(