From 1f1619c7305a8be7b3531584a47adce3a9ed2514 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 27 Apr 2021 09:14:08 -0400 Subject: [PATCH] Convert all test suite sync funcs --- examples/actor_spawning_and_causality.py | 2 +- examples/actor_spawning_and_causality_with_daemon.py | 2 +- examples/parallelism/concurrent_actors_primes.py | 2 +- tests/test_cancellation.py | 2 +- tests/test_spawning.py | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/actor_spawning_and_causality.py b/examples/actor_spawning_and_causality.py index 0d577c0..ca793f1 100644 --- a/examples/actor_spawning_and_causality.py +++ b/examples/actor_spawning_and_causality.py @@ -1,7 +1,7 @@ import tractor -def cellar_door(): +async def cellar_door(): assert not tractor.is_root_process() return "Dang that's beautiful" diff --git a/examples/actor_spawning_and_causality_with_daemon.py b/examples/actor_spawning_and_causality_with_daemon.py index 1216af0..1ab0f88 100644 --- a/examples/actor_spawning_and_causality_with_daemon.py +++ b/examples/actor_spawning_and_causality_with_daemon.py @@ -1,7 +1,7 @@ import tractor -def movie_theatre_question(): +async def movie_theatre_question(): """A question asked in a dark theatre, in a tangent (errr, I mean different) process. """ diff --git a/examples/parallelism/concurrent_actors_primes.py b/examples/parallelism/concurrent_actors_primes.py index 3ff8dab..a2aec90 100644 --- a/examples/parallelism/concurrent_actors_primes.py +++ b/examples/parallelism/concurrent_actors_primes.py @@ -29,7 +29,7 @@ PRIMES = [ ] -def is_prime(n): +async def is_prime(n): if n < 2: return False if n == 2: diff --git a/tests/test_cancellation.py b/tests/test_cancellation.py index 458607d..42aec35 100644 --- a/tests/test_cancellation.py +++ b/tests/test_cancellation.py @@ -120,7 +120,7 @@ def test_multierror_fast_nursery(arb_addr, start_method, num_subactors, delay): assert exc.type == AssertionError -def do_nothing(): +async def do_nothing(): pass diff --git a/tests/test_spawning.py b/tests/test_spawning.py index a8da2c1..fb1e1be 100644 --- a/tests/test_spawning.py +++ b/tests/test_spawning.py @@ -51,7 +51,7 @@ def test_local_arbiter_subactor_global_state(arb_addr): assert result == 10 -def movie_theatre_question(): +async def movie_theatre_question(): """A question asked in a dark theatre, in a tangent (errr, I mean different) process. """ @@ -80,7 +80,7 @@ async def test_movie_theatre_convo(start_method): await portal.cancel_actor() -def cellar_door(): +async def cellar_door(): return "Dang that's beautiful"