From c45e0567864738dc0c8847f917bb24c8c2a5c451 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Mon, 14 Nov 2011 12:10:59 +0100 Subject: [PATCH] Add some project meta stuff. --- .gitignore | 4 ++++ README.md | 18 ++++++++++++++++++ run_tests | 12 ++++++++++++ tests/test_rq.py | 25 +++++++++++++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100755 run_tests create mode 100644 tests/test_rq.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6387457 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.pyc +dump.rdb + +/*.egg-info diff --git a/README.md b/README.md new file mode 100644 index 0000000..94bdbf4 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# WARNING: DON'T USE THIS IN PRODUCTION (yet) + +# rq — Simple job queues for Python + +**rq** is an attempt at a lightweight Python job queue, using Redis as the +queue provider. + + +### Installation + +Simply use the following command to install the latest released version: + + pip install rq + +If you want the cutting edge version (that may well be broken), use this: + + pip install -e git+git@github.com:nvie/rq.git@master#egg=rdb + diff --git a/run_tests b/run_tests new file mode 100755 index 0000000..d42ef9d --- /dev/null +++ b/run_tests @@ -0,0 +1,12 @@ +#!/bin/sh +check_redis_running() { + redis-cli echo "just checking" > /dev/null + return $? +} + +if check_redis_running; then + /usr/bin/env python -m unittest discover -v -s tests $@ 2>&1 | egrep -v '^test_' +else + echo "Redis not running." >&2 + return 2 +fi diff --git a/tests/test_rq.py b/tests/test_rq.py new file mode 100644 index 0000000..8cc1200 --- /dev/null +++ b/tests/test_rq.py @@ -0,0 +1,25 @@ +import unittest +from blinker import signal +from redis import Redis + +testconn = Redis() + +class RQTestCase(unittest.TestCase): + def setUp(self): + super(RQTestCase, self).setUp() + testconn.flushdb() + signal('setup').send(self) + + def tearDown(self): + signal('teardown').send(self) + testconn.flushdb() + super(RQTestCase, self).tearDown() + + +class TestRQ(RQTestCase): + def test_math(self): + assert 1 + 2 == 3 + + +if __name__ == '__main__': + unittest.main()