Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0bb24f5

Browse files
chore: add running unit tests on windows/macos
Add running the unit tests on windows-latest and macos-latest withPython 3.10.
1 parent3a7d6f6 commit0bb24f5

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

‎.github/workflows/test.yml

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

44+
unit_win_mac:
45+
runs-on:${{ matrix.os }}
46+
strategy:
47+
matrix:
48+
os:[windows-latest, macos-latest]
49+
python-version:["3.10"]
50+
steps:
51+
-uses:actions/checkout@v2
52+
-name:Set up Python ${{ matrix.python-version }}
53+
uses:actions/setup-python@v2
54+
with:
55+
python-version:${{ matrix.python-version }}
56+
-name:Install dependencies
57+
run:pip install tox pytest-github-actions-annotate-failures
58+
-name:Run tests
59+
env:
60+
TOXENV:py310,smoke
61+
run:tox
62+
4463
functional:
4564
runs-on:ubuntu-20.04
4665
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
importio
1919
importos
20+
importsys
2021
fromtextwrapimportdedent
2122
fromunittestimportmock
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
deftest_data_from_helper(m_open,path_exists,tmp_path):
218220
helper=tmp_path/"helper.sh"
219221
helper.write_text(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp