Skip to content

Commit e47bcda

Browse files
authored
Merge pull request #72 from Vizonex/fix-processes
Fix Argument inputs using Shlex parser and remove "/s"
2 parents 6848bbc + 57c53fe commit e47bcda

14 files changed

Lines changed: 657 additions & 126 deletions

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ test = [
4545
'psutil',
4646
'pycodestyle>=2.9,<2.15',
4747
'pyOpenSSL>=23.0,<25.4',
48-
'mypy>=0.800',
48+
'mypy>=0.800'
4949
]
5050
dev = [
5151
'setuptools>=60',

tests/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import unittest.runner
55
import multiprocessing
66

7+
78
def suite():
89
test_loader = unittest.TestLoader()
910
test_suite = test_loader.discover(os.path.dirname(__file__))

tests/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
import multiprocessing
2-
multiprocessing.freeze_support()
2+
3+
multiprocessing.freeze_support()

tests/test_aiomultiprocess.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@
1414
from winloop import _testbase as tb
1515

1616

17-
1817
def my_map():
1918
return [random.uniform(0.005, 1) for _ in range(7)]
2019

2120

2221
class _Test_Multiprocessing:
2322
"""Used for Testing aiomultiprocessing"""
2423

25-
@unittest.skip("aiomultiprocess has an import bug releated to having a tests module")
24+
@unittest.skip(
25+
"aiomultiprocess has an import bug releated to having a tests module"
26+
)
2627
def test_process_spawning(self):
2728
# See:
2829
# https://github.com/Vizonex/Winloop/issues/11#issuecomment-1922659521

tests/test_process.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,10 @@ async def test():
430430
print("OK")
431431
"""
432432

433-
with tempfile.TemporaryFile() as inherited, tempfile.TemporaryFile() as non_inherited:
433+
with (
434+
tempfile.TemporaryFile() as inherited,
435+
tempfile.TemporaryFile() as non_inherited,
436+
):
434437
proc = await asyncio.create_subprocess_exec(
435438
sys.executable,
436439
b"-W",
@@ -989,6 +992,7 @@ async def test():
989992
""")
990993
subprocess.run([sys.executable, "-c", script], check=True)
991994

995+
992996

993997
class Test_AIO_Process(_TestProcess, tb.AIOTestCase):
994998
pass

winloop/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def install() -> None:
4949
"""
5050
if _sys.version_info >= (3, 12):
5151
_warnings.warn(
52+
5253
"winloop.install() is deprecated and discouraged in favor of winloop.run()"
5354
"starting with Python 3.12."
5455
" SEE: https://github.com/MagicStack/uvloop/issues/637 "
@@ -280,4 +281,3 @@ def __init__(self):
280281
"use winloop.new_event_loop or winloop.run() or winloop.Loop() instead "
281282
"SEE: https://github.com/MagicStack/uvloop/issues/637",
282283
)
283-

0 commit comments

Comments
 (0)