Skip to content

Commit

Permalink
Merge pull request #100 from truh/cleanup-unused-loops
Browse files Browse the repository at this point in the history
Cleanup unused loops
  • Loading branch information
sysid authored Jun 6, 2024
2 parents f4a90ed + 9c3d730 commit 4b1ec63
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ __pycache__/
venv/
Pipfile.lock
.envrc
.pdm-python
1 change: 0 additions & 1 deletion .pdm-python

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ that does not rely on async generators but instead uses memory channels (`exampl

## Development, Contributing
1. install pdm: `pip install pdm`
2. install dependencies using pipenv: `pdm install -d.`
2. install dependencies using pipenv: `pdm install -d`.
3. To run tests:

### Makefile
- make sure your virtualenv is active
- check `Makefile` for available commands and development support, e.g. run the unit tests:
```python
```shell
make test
make tox
```
Expand Down
5 changes: 2 additions & 3 deletions tests/integration/test_multiple_consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,9 @@ def test_stop_server_with_many_consumers(caplog, server_command, expected_lines)
if server_process is None or server_process.poll() is not None:
pytest.fail("Server did not start.")

# Initialize asyncio loops and threads
loops = [asyncio.new_event_loop() for _ in range(N_CONSUMER)]
# Initialize threads
threads = []
for loop in loops:
for _ in range(N_CONSUMER):
thread = threading.Thread(
target=lambda: asyncio.run(
make_arequest(f"{URL}:{port}/endless", expected_lines=expected_lines)
Expand Down

0 comments on commit 4b1ec63

Please sign in to comment.