Skip to content
Merged
Show file tree
Hide file tree
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
41 changes: 37 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,47 @@
language: python
sudo: false

python:
# CPython:
- "2.7"
- "pypy"
- "pypy3"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
- "3.7-dev"
- "3.7-dev" # TODO: change to "3.7" once it gets released
- "nightly"
# PyPy:
- "pypy"
- "pypy3"

os:
- linux # Linux is officially supported and we test the library under
# many different Python verions (see "python: ..." above)

# - osx # OSX + Python is not officially supported by Travis CI as of Feb. 2018
# nevertheless, "nightly" and some "*-dev" versions seem to work, so we
# include them explicitly below (see "matrix: include: ..." below)

# - windows # Windows is not supported at all by Travis CI as of Feb. 2018

# Linux setup
dist: trusty
sudo: false

matrix:
# see "os: ..." above
include:
- os: osx
python: "3.6-dev"
- os: osx
python: "3.7-dev"
- os: osx
python: "nightly"

# allow all nighly builds to fail, since these python versions might be unstable
# we do not allow dev builds to fail, since these builds are stable enough
allow_failures:
- python: "nightly"

install:
- travis_retry pip install .
- travis_retry pip install -r requirements.txt
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ python-can
:alt: Documentation Status

.. |build| image:: https://travis-ci.org/hardbyte/python-can.svg?branch=develop
:target: https://travis-ci.org/hardbyte/python-can
:target: https://travis-ci.org/hardbyte/python-can/branches
:alt: CI Server for develop branch


Expand All @@ -26,7 +26,7 @@ Python developers; providing `common abstractions to
different hardware devices`, and a suite of utilities for sending and receiving
messages on a can bus.

The library supports Python 2.7, Python 3.3+ and runs on Mac, Linux and Windows.
The library supports Python 2.7, Python 3.3+ as well as PyPy and runs on Mac, Linux and Windows.

You can find more information in the documentation, online at
`python-can.readthedocs.org <https://python-can.readthedocs.org/en/stable/>`__.
Expand Down
2 changes: 1 addition & 1 deletion can/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import logging

__version__ = "2.0.0"
__version__ = "2.1.0.rc2"

log = logging.getLogger('can')

Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-

"""
python-can requires the setuptools package to be installed.
"""

import re
import logging
from setuptools import setup, find_packages
Expand Down
6 changes: 4 additions & 2 deletions test/back2back_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,13 @@ def test_no_message(self):
def test_timestamp(self):
self.bus2.send(can.Message())
recv_msg1 = self.bus1.recv(TIMEOUT)
time.sleep(1)
time.sleep(5)
self.bus2.send(can.Message())
recv_msg2 = self.bus1.recv(TIMEOUT)
delta_time = recv_msg2.timestamp - recv_msg1.timestamp
self.assertTrue(0.95 < delta_time < 1.05)
self.assertTrue(4.8 < delta_time < 5.2,
'Time difference should have been 5s +/- 200ms.'
'But measured {}'.format(delta_time))

def test_standard_message(self):
msg = can.Message(extended_id=False,
Expand Down
6 changes: 3 additions & 3 deletions test/simplecyclic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ def test_cycle_time(self):
task = bus.send_periodic(msg, 0.01, 1)
self.assertIsInstance(task, can.broadcastmanager.CyclicSendTaskABC)

sleep(1.5)
sleep(5)
size = bus2.queue.qsize()
print(size)
# About 100 messages should have been transmitted
self.assertTrue(90 < size < 110)
self.assertTrue(90 < size < 110,
'100 +/- 10 messages should have been transmitted. But queue contained {}'.format(size))
last_msg = bus2.recv()
self.assertEqual(last_msg, msg)

Expand Down