mirror of
https://github.com/kennethreitz/pydantic.git
synced 2026-06-05 23:00:18 +00:00
Azure Pipelines - tests for windows (#538)
* add azure-pipelines.yml * fix install command * skip some tests on windows
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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',
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user