11import os
2+ import sys
23from pathlib import Path
34from typing import Optional
45
@@ -173,6 +174,9 @@ def test_set_no_file(cli):
173174 assert "Missing argument" in result .output
174175
175176
177+ @pytest .mark .skipif (
178+ sys .platform .startswith ("win" ), reason = "sh module doesn't support Windows"
179+ )
176180def test_get_default_path (tmp_path ):
177181 with sh .pushd (tmp_path ):
178182 (tmp_path / ".env" ).write_text ("a=b" )
@@ -182,6 +186,9 @@ def test_get_default_path(tmp_path):
182186 assert result == "b\n "
183187
184188
189+ @pytest .mark .skipif (
190+ sys .platform .startswith ("win" ), reason = "sh module doesn't support Windows"
191+ )
185192def test_run (tmp_path ):
186193 with sh .pushd (tmp_path ):
187194 (tmp_path / ".env" ).write_text ("a=b" )
@@ -191,6 +198,9 @@ def test_run(tmp_path):
191198 assert result == "b\n "
192199
193200
201+ @pytest .mark .skipif (
202+ sys .platform .startswith ("win" ), reason = "sh module doesn't support Windows"
203+ )
194204def test_run_with_existing_variable (tmp_path ):
195205 with sh .pushd (tmp_path ):
196206 (tmp_path / ".env" ).write_text ("a=b" )
@@ -202,6 +212,9 @@ def test_run_with_existing_variable(tmp_path):
202212 assert result == "b\n "
203213
204214
215+ @pytest .mark .skipif (
216+ sys .platform .startswith ("win" ), reason = "sh module doesn't support Windows"
217+ )
205218def test_run_with_existing_variable_not_overridden (tmp_path ):
206219 with sh .pushd (tmp_path ):
207220 (tmp_path / ".env" ).write_text ("a=b" )
@@ -213,6 +226,9 @@ def test_run_with_existing_variable_not_overridden(tmp_path):
213226 assert result == "c\n "
214227
215228
229+ @pytest .mark .skipif (
230+ sys .platform .startswith ("win" ), reason = "sh module doesn't support Windows"
231+ )
216232def test_run_with_none_value (tmp_path ):
217233 with sh .pushd (tmp_path ):
218234 (tmp_path / ".env" ).write_text ("a=b\n c" )
@@ -222,6 +238,9 @@ def test_run_with_none_value(tmp_path):
222238 assert result == "b\n "
223239
224240
241+ @pytest .mark .skipif (
242+ sys .platform .startswith ("win" ), reason = "sh module doesn't support Windows"
243+ )
225244def test_run_with_other_env (dotenv_path ):
226245 dotenv_path .write_text ("a=b" )
227246
0 commit comments