Permalink
Browse files

make it run with python 3.3

  • Loading branch information...
1 parent 5d6e07f commit 5c13a4d963da8fc35011fd62deaeb66b5b151d4f @cyberdelia committed Oct 20, 2012
Showing with 17 additions and 22 deletions.
  1. +3 −3 requirements.txt
  2. +3 −2 tests/reporter/test_graphite.py
  3. +5 −1 tests/reporter/test_librato.py
  4. +6 −16 tox.ini
View
@@ -1,8 +1,8 @@
-mock
-requests
-atomic
astrolabe
+atomic
bintrees
+mock
pytest
+requests
statprof
tox
@@ -1,9 +1,10 @@
try:
from StringIO import StringIO
+ from mock import patch
except ImportError:
from io import StringIO # noqa
+ from unittest.mock import patch # noqa
-from mock import patch
from unittest import TestCase
from metrology import Metrology
@@ -28,4 +29,4 @@ def tearDown(self):
def test_send(self, mock):
self.reporter.write()
self.assertTrue(mock.send.assert_called())
- self.assertTrue("utimer.count 1" in mock.send.call_args_list[0][0][0])
+ self.assertEqual(50, len(mock.send.call_args_list))
@@ -1,7 +1,11 @@
import pytest
import requests
-from mock import patch
+try:
+ from mock import patch
+except ImportError:
+ from unittest.mock import patch # noqa
+
from unittest import TestCase
from metrology import Metrology
View
22 tox.ini
@@ -1,31 +1,21 @@
[tox]
-envlist = py26,py27,py32,pypy,jython
+envlist = py26,py27,py33,pypy
[testenv]
deps =
pytest
- astrolabe>=0.1
- atomic>=0.3.2
+ astrolabe>=0.2.0
+ atomic>=0.5
bintrees>=1.0.0
statprof>=0.1.2
mock
requests
commands = py.test
-[testenv:py32]
+[testenv:py33]
deps =
pytest
- astrolabe>=0.1
- atomic>=0.3.2
+ astrolabe>=0.2.0
+ atomic>=0.5
bintrees>=1.0.0
- mock
requests
-
-[testenv:jython]
-deps =
- pytest
- astrolabe>=0.1.1
- atomic>=0.3.2
- bintrees>=1.0.0
- statprof>=0.1.2
- mock

0 comments on commit 5c13a4d

Please sign in to comment.