import pytest

from ratelimiter import RateLimiter

@pytest.mark.asyncio
async def test_alock():
    rl = RateLimiter(max_calls=10, period=0.01)

    assert rl._alock is None

    async with rl:
        pass

    alock = rl._alock
    assert alock

    async with rl:
        pass

    assert rl._alock is alock

import pytest

from ratelimiter import RateLimiter

@pytest.mark.asyncio
async def test_alock(event_loop):
    rl = RateLimiter(max_calls=10, period=0.01)

    assert rl._alock is None

    async with rl:
        pass

    alock = rl._alock
    assert alock

    async with rl:
        pass

    assert rl._alock is alock

Fix Runtime warnings on async tests
Fix Runtime warnings on async tests

  import pytest
  
  from ratelimiter import RateLimiter
  
  @pytest.mark.asyncio
- async def test_alock():
+ async def test_alock(event_loop):
      rl = RateLimiter(max_calls=10, period=0.01)
  
      assert rl._alock is None
  
      async with rl:
          pass
  
      alock = rl._alock
      assert alock
  
      async with rl:
          pass
  
      assert rl._alock is alock
  
Fix Runtime warnings on async tests
## Code Before:
import pytest

from ratelimiter import RateLimiter

@pytest.mark.asyncio
async def test_alock():
    rl = RateLimiter(max_calls=10, period=0.01)

    assert rl._alock is None

    async with rl:
        pass

    alock = rl._alock
    assert alock

    async with rl:
        pass

    assert rl._alock is alock

## Instruction:
Fix Runtime warnings on async tests
## Code After:
import pytest

from ratelimiter import RateLimiter

@pytest.mark.asyncio
async def test_alock(event_loop):
    rl = RateLimiter(max_calls=10, period=0.01)

    assert rl._alock is None

    async with rl:
        pass

    alock = rl._alock
    assert alock

    async with rl:
        pass

    assert rl._alock is alock
