Skip to content
Snippets Groups Projects
Unverified Commit 974a485c authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

fixed tests

parent 4c8a2e08
No related branches found
No related tags found
No related merge requests found
Pipeline #62133 passed with stages
in 2 minutes and 54 seconds
...@@ -33,6 +33,7 @@ unittest: ...@@ -33,6 +33,7 @@ unittest:
- coverage run --append -m compile_definitions - coverage run --append -m compile_definitions
script: script:
- coverage run --append -m nose2 -F -vv - coverage run --append -m nose2 -F -vv
- COOLAMQP_FORCE_SELECT_LISTENER=1 coverage run --append -m nose2 -F -vv
after_script: after_script:
- mv .coverage .coverage.units - mv .coverage .coverage.units
variables: variables:
......
...@@ -4,10 +4,16 @@ ...@@ -4,10 +4,16 @@
1.1. If it's cool af, you don't have to. 1.1. If it's cool af, you don't have to.
2. Exhaustive pydoc. 2. Exhaustive pydoc.
3. If you introduce any gotchas, document them in [docs/](docs/). 3. If you introduce any gotchas, document them in [docs/](docs/).
4. We aim to support Python 2.7 as long as possible, keep that in account.
## Unit tests ## Unit tests
Tests work using either Travis CI or Vagrant. Tests work using docker-compose.
Just
```bash
docker-compose up --build unittest
docker-compose up --build stress_tests
```
If you want to debug things, you have RabbitMQ management enabled on Vagrant. If you want to debug things, you have RabbitMQ management enabled on Vagrant.
Go to [http://127.0.0.1:15672](http://127.0.0.1:15672) and log in with **user** / **user** Go to [http://127.0.0.1:15672](http://127.0.0.1:15672) and log in with **user** / **user**
......
version: '3.2' version: '3.2'
services: services:
amqp: amqp:
image: rabbitmq image: rabbitmq:3-management
unittest: unittest:
build: build:
context: . context: .
dockerfile: tests/Dockerfile dockerfile: tests/Dockerfile
depends_on: depends_on:
- amqp - amqp
environment:
AMQP_HOST: "amqp"
stress_tests: stress_tests:
build: build:
context: . context: .
...@@ -15,3 +17,5 @@ services: ...@@ -15,3 +17,5 @@ services:
command: python -m stress_tests command: python -m stress_tests
depends_on: depends_on:
- amqp - amqp
environment:
AMQP_HOST: "amqp"
#!/usr/bin/env python
# coding=UTF-8
from setuptools import setup, find_packages from setuptools import setup, find_packages
from coolamqp import __version__ from coolamqp import __version__
...@@ -8,7 +6,6 @@ setup(keywords=['amqp', 'rabbitmq', 'client', 'network', 'ha', 'high availabilit ...@@ -8,7 +6,6 @@ setup(keywords=['amqp', 'rabbitmq', 'client', 'network', 'ha', 'high availabilit
version=__version__, version=__version__,
packages=find_packages(include=['coolamqp', 'coolamqp.*']), packages=find_packages(include=['coolamqp', 'coolamqp.*']),
install_requires=['six'], install_requires=['six'],
# per coverage version for codeclimate-reporter
tests_require=["pytest", "coverage"], tests_require=["pytest", "coverage"],
test_suite='nose2.collector.collector', test_suite='nose2.collector.collector',
python_requires='!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*', python_requires='!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment