Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(python): clarify/simplify test setup #2558

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions python/copy_scripts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
cp -r ../rawScripts/. ./bullmq/commands/ || echo "Raw scripts are not available. Create them by running ' yarn install' and/or ' yarn generate:raw:scripts'"
11 changes: 11 additions & 0 deletions python/flush_redis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import asyncio

from bullmq.redis_connection import RedisConnection


async def flush():
await RedisConnection().conn.flushall()


if __name__ == '__main__':
asyncio.run(flush())
9 changes: 2 additions & 7 deletions python/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#!/bin/bash
redis-cli flushall
python3 -m unittest -v tests.bulk_tests
python3 -m unittest -v tests.delay_tests
python3 -m unittest -v tests.flow_tests
python3 -m unittest -v tests.job_tests
python3 -m unittest -v tests.queue_tests
python3 -m unittest -v tests.worker_tests
python flush_redis.py
python -m unittest discover -s tests/ -p "*_tests.py" -t .