Skip to content

Commit cd2c9bd

Browse files
chore: add running unit tests on Windows
Add running the unit tests on Windows with Python 3.10 only.
1 parent 2708f91 commit cd2c9bd

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,26 @@ jobs:
4141
TOXENV: ${{ matrix.toxenv }}
4242
run: tox
4343

44+
unit_windows:
45+
runs-on: windows-latest
46+
strategy:
47+
matrix:
48+
include:
49+
- python-version: "3.10"
50+
toxenv: py310,smoke
51+
steps:
52+
- uses: actions/checkout@v2
53+
- name: Set up Python ${{ matrix.python-version }}
54+
uses: actions/setup-python@v2
55+
with:
56+
python-version: ${{ matrix.python-version }}
57+
- name: Install dependencies
58+
run: pip install tox pytest-github-actions-annotate-failures
59+
- name: Run tests
60+
env:
61+
TOXENV: ${{ matrix.toxenv }}
62+
run: tox
63+
4464
functional:
4565
runs-on: ubuntu-20.04
4666
strategy:

tests/unit/test_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import io
1919
import os
20+
import sys
2021
from textwrap import dedent
2122
from unittest import mock
2223

@@ -214,6 +215,7 @@ def test_valid_data(m_open, path_exists):
214215

215216
@mock.patch("os.path.exists")
216217
@mock.patch("builtins.open")
218+
@pytest.mark.skipif(sys.platform.startswith("win"), reason="Not supported on Windows")
217219
def test_data_from_helper(m_open, path_exists, tmp_path):
218220
helper = tmp_path / "helper.sh"
219221
helper.write_text(

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy