22from pathlib import Path
33import uuid
44import os
5+ import sys
56
67import pytest
78
@@ -52,6 +53,7 @@ def temp_dir():
5253# pass # Ignore cleanup errors
5354
5455
56+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
5557def test_async_decorator_application_behavior_mode ():
5658 async_function_code = '''
5759import asyncio
@@ -86,6 +88,7 @@ async def async_function(x: int, y: int) -> int:
8688 assert modified_code .strip () == expected_decorated_code .strip ()
8789
8890
91+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
8992def test_async_decorator_application_performance_mode ():
9093 async_function_code = '''
9194import asyncio
@@ -120,6 +123,7 @@ async def async_function(x: int, y: int) -> int:
120123 assert modified_code .strip () == expected_decorated_code .strip ()
121124
122125
126+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
123127def test_async_class_method_decorator_application ():
124128 async_class_code = '''
125129import asyncio
@@ -171,6 +175,7 @@ def sync_method(self, a: int, b: int) -> int:
171175 assert modified_code .strip () == expected_decorated_code .strip ()
172176
173177
178+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
174179def test_async_decorator_no_duplicate_application ():
175180 already_decorated_code = '''
176181from codeflash.code_utils.codeflash_wrap_decorator import codeflash_behavior_async
@@ -207,6 +212,7 @@ async def async_function(x: int, y: int) -> int:
207212 assert modified_code .strip () == expected_reformatted_code .strip ()
208213
209214
215+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
210216def test_inject_profiling_async_function_behavior_mode (temp_dir ):
211217 source_module_code = '''
212218import asyncio
@@ -265,6 +271,7 @@ async def test_async_function():
265271 assert instrumented_test_code is None
266272
267273
274+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
268275def test_inject_profiling_async_function_performance_mode (temp_dir ):
269276 source_module_code = '''
270277import asyncio
@@ -324,6 +331,7 @@ async def test_async_function():
324331 assert instrumented_test_code is None
325332
326333
334+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
327335def test_mixed_sync_async_instrumentation (temp_dir ):
328336 source_module_code = '''
329337import asyncio
@@ -394,6 +402,7 @@ async def test_mixed_functions():
394402 assert instrumented_test_code is None
395403
396404
405+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
397406def test_async_function_qualified_name_handling ():
398407 nested_async_code = '''
399408import asyncio
@@ -435,6 +444,7 @@ async def nested_async_method(self, x: int) -> int:
435444 assert modified_code .strip () == expected_output .strip ()
436445
437446
447+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
438448def test_async_decorator_with_existing_decorators ():
439449 """Test async decorator application when function already has other decorators."""
440450 decorated_async_code = '''
@@ -470,6 +480,7 @@ async def async_function(x: int, y: int) -> int:
470480 assert codeflash_pos < my_decorator_pos
471481
472482
483+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
473484def test_sync_function_not_affected_by_async_logic ():
474485 sync_function_code = '''
475486def sync_function(x: int, y: int) -> int:
@@ -491,6 +502,7 @@ def sync_function(x: int, y: int) -> int:
491502 assert not decorator_added
492503 assert modified_code == sync_function_code
493504
505+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
494506def test_inject_profiling_async_multiple_calls_same_test (temp_dir ):
495507 """Test that multiple async function calls within the same test function get correctly numbered 0, 1, 2, etc."""
496508 source_module_code = '''
@@ -579,6 +591,7 @@ async def test_multiple_calls():
579591
580592
581593
594+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
582595def test_async_behavior_decorator_return_values_and_test_ids ():
583596 """Test that async behavior decorator correctly captures return values, test IDs, and stores data in database."""
584597 import asyncio
@@ -677,6 +690,7 @@ async def test_async_multiply(x: int, y: int) -> int:
677690 del os .environ [k ]
678691
679692
693+ @pytest .mark .skipif (sys .platform == "win32" , reason = "pending support for asyncio on windows" )
680694def test_async_decorator_comprehensive_return_values_and_test_ids ():
681695 import asyncio
682696 import os
0 commit comments