Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Several updates to tox testing configuration #63

Merged
merged 6 commits into from

2 participants

@dvarrazzo
  • Fixed configuration for tox 1.4.2
  • Added tox config for Python 3.2
  • Fixed dependencies for older Python versions
dvarrazzo added some commits
@dvarrazzo dvarrazzo Fixed tox invocation
Without escaping the quotes, running tox raises::

	NameError: name 'unittest' is not defined

tox version is 1.4.2 on Python 2.7.
cb1bd3a
@dvarrazzo dvarrazzo Added Python 3.2 testing environment to tox config cb116b8
@dvarrazzo dvarrazzo Silence tests warnings on Python 3.2 b8b2c7d
@dvarrazzo dvarrazzo Fixed simplejson version in tox env for python 2.4
simplejson 2.0.9 was the last supported version for Python 2.4
b33d76d
@dvarrazzo dvarrazzo Fixed pyzmq version in tox env for python 2.5
pyzmq 2.1.11 is the last version supporting Python 2.5
40abda5
@dvarrazzo dvarrazzo Dropped pyzmq from test environment for Python 2.4 4d6820b
@brainstorm brainstorm merged commit 9b6af71 into mitsuhiko:master
@dvarrazzo dvarrazzo deleted the dvarrazzo:update-tests branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 5, 2012
  1. @dvarrazzo

    Fixed tox invocation

    dvarrazzo authored
    Without escaping the quotes, running tox raises::
    
    	NameError: name 'unittest' is not defined
    
    tox version is 1.4.2 on Python 2.7.
  2. @dvarrazzo
  3. @dvarrazzo
  4. @dvarrazzo

    Fixed simplejson version in tox env for python 2.4

    dvarrazzo authored
    simplejson 2.0.9 was the last supported version for Python 2.4
  5. @dvarrazzo

    Fixed pyzmq version in tox env for python 2.5

    dvarrazzo authored
    pyzmq 2.1.11 is the last version supporting Python 2.5
  6. @dvarrazzo
This page is out of date. Refresh to see the latest.
View
2  logbook/testsuite/__init__.py
@@ -36,6 +36,8 @@ class LogbookTestCase(unittest.TestCase):
def setUp(self):
self.log = logbook.Logger('testlogger')
+# silence deprecation warning displayed on Py 3.2
+LogbookTestCase.assert_ = LogbookTestCase.assertTrue
def make_fake_mail_handler(**kwargs):
class FakeMailHandler(logbook.MailHandler):
View
29 logbook/testsuite/test_contextmanager.py
@@ -329,19 +329,22 @@ def test_syslog_handler(self):
to_test.append((socket.AF_UNIX, self.filename))
for sock_family, address in to_test:
inc = socket.socket(sock_family, socket.SOCK_DGRAM)
- inc.bind(address)
- inc.settimeout(1)
- for app_name in [None, 'Testing']:
- handler = logbook.SyslogHandler(app_name, inc.getsockname())
- with handler:
- self.log.warn('Syslog is weird')
- try:
- rv = inc.recvfrom(1024)[0]
- except socket.error:
- self.fail('got timeout on socket')
- self.assertEqual(rv, (
- u'<12>%stestlogger: Syslog is weird\x00' %
- (app_name and app_name + u':' or u'')).encode('utf-8'))
+ try:
+ inc.bind(address)
+ inc.settimeout(1)
+ for app_name in [None, 'Testing']:
+ handler = logbook.SyslogHandler(app_name, inc.getsockname())
+ with handler:
+ self.log.warn('Syslog is weird')
+ try:
+ rv = inc.recvfrom(1024)[0]
+ except socket.error:
+ self.fail('got timeout on socket')
+ self.assertEqual(rv, (
+ u'<12>%stestlogger: Syslog is weird\x00' %
+ (app_name and app_name + u':' or u'')).encode('utf-8'))
+ finally:
+ inc.close()
def test_handler_processors(self):
handler = make_fake_mail_handler(format_string='''\
View
35 logbook/testsuite/test_regular.py
@@ -496,22 +496,25 @@ def test_syslog_handler(self):
to_test.append((socket.AF_UNIX, self.filename))
for sock_family, address in to_test:
inc = socket.socket(sock_family, socket.SOCK_DGRAM)
- inc.bind(address)
- inc.settimeout(1)
- for app_name in [None, 'Testing']:
- handler = logbook.SyslogHandler(app_name, inc.getsockname())
- handler.push_thread()
- try:
- self.log.warn('Syslog is weird')
- finally:
- handler.pop_thread()
- try:
- rv = inc.recvfrom(1024)[0]
- except socket.error:
- self.fail('got timeout on socket')
- self.assertEqual(rv, (
- u'<12>%stestlogger: Syslog is weird\x00' %
- (app_name and app_name + u':' or u'')).encode('utf-8'))
+ try:
+ inc.bind(address)
+ inc.settimeout(1)
+ for app_name in [None, 'Testing']:
+ handler = logbook.SyslogHandler(app_name, inc.getsockname())
+ handler.push_thread()
+ try:
+ self.log.warn('Syslog is weird')
+ finally:
+ handler.pop_thread()
+ try:
+ rv = inc.recvfrom(1024)[0]
+ except socket.error:
+ self.fail('got timeout on socket')
+ self.assertEqual(rv, (
+ u'<12>%stestlogger: Syslog is weird\x00' %
+ (app_name and app_name + u':' or u'')).encode('utf-8'))
+ finally:
+ inc.close()
def test_handler_processors(self):
handler = make_fake_mail_handler(format_string='''\
View
15 tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist=py24,py25,py26,py27,py31,docs
+envlist=py24,py25,py26,py27,py31,py32,docs
[testenv]
deps=
@@ -7,16 +7,15 @@ deps=
pyzmq
execnet
Jinja2
-commands=python -c __import__('unittest').main('logbook.testsuite','suite')
+commands=python -c __import__(\'unittest\').main(\'logbook.testsuite\',\'suite\')
changedir={toxworkdir}
[testenv:py24]
deps=
SQLAlchemy
pysqlite
- simplejson
+ simplejson==2.0.9
multiprocessing
- pyzmq
execnet
Jinja2
@@ -25,7 +24,7 @@ deps=
SQLAlchemy
simplejson
multiprocessing
- pyzmq
+ pyzmq==2.1.11
execnet
Jinja2
@@ -35,6 +34,12 @@ deps=
execnet
Jinja2
+[testenv:py32]
+deps=
+ SQLAlchemy
+ execnet
+ Jinja2
+
[testenv:docs]
deps=
Sphinx
Something went wrong with that request. Please try again.