Repository: daltonmatos/alchemytools (language: python)

Issue:
Release 0.5



Discussion / hints:

Fix patch:
diff --git a/alchemytools/__init__.py b/alchemytools/__init__.py
index 45869b6..ef7eb44 100644
--- a/alchemytools/__init__.py
+++ b/alchemytools/__init__.py
@@ -1,1 +1,1 @@
-__version__ = '0.5.2'
+__version__ = '0.6.0'
diff --git a/setup.py b/setup.py
index 5096547..1a4add9 100755
--- a/setup.py
+++ b/setup.py
@@ -15,8 +15,8 @@
     author_email='daltonmatos@gmail.com',
     url='https://github.com/daltonmatos/alchemytools',
     packages=find_packages(),
-    install_requires=['SQLAlchemy >=0.7.8, <=1.1.4'],
-    tests_require=['tox==2.5.0', 'mock==1.3.0'],
+    install_requires=['SQLAlchemy >=0.7.8, <=1.2.15'],
+    tests_require=['tox==3.5.3', 'mock==2.0.0'],
     classifiers=[
           'Intended Audience :: Developers',
           'License :: OSI Approved :: BSD License',
@@ -24,6 +24,8 @@
           'Programming Language :: Python :: 2.6',
           'Programming Language :: Python :: 2.7',
           'Programming Language :: Python :: 3.5',
+          'Programming Language :: Python :: 3.6',
+          'Programming Language :: Python :: 3.7',
           'Topic :: Software Development',
           'Topic :: Software Development :: Libraries',
           'Topic :: Software Development :: Libraries :: Python Modules',
diff --git a/tox.ini b/tox.ini
index 2e5d000..3870132 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
 # content of: tox.ini , put in same dir as setup.py
 [tox]
-envlist = py26,py27,py35
+envlist = py26,py27,py35,py36,py37
 [testenv]
 deps=mock
 commands=./setup.py test


Test patch:
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/tests/context_test.py b/tests/context_test.py
index 18158b9..2524494 100644
--- a/tests/context_test.py
+++ b/tests/context_test.py
@@ -65,7 +65,6 @@ def test_commit_after_yield_when_commit_on_success_is_default(self):
             pass
         self.assertEqual(real_session.commit.call_count, 1)
 
-
     def test_dont_commit_after_yield_when_commit_on_success_is_false(self):
         real_session = mock.Mock()
         self.mock_session.return_value = real_session
@@ -73,7 +72,6 @@ def test_dont_commit_after_yield_when_commit_on_success_is_false(self):
             pass
         self.assertEqual(real_session.commit.call_count, 0)
 
-
     def test_close_after_yield(self):
         real_session = mock.Mock()
         self.mock_session.return_value = real_session
@@ -105,10 +103,11 @@ def test_context_should_reraise_exceptions(self):
     def test_callback_is_called(self):
         func = mock.Mock()
         callback = Callback(func, 42, foo="bar")
-        with managed(mock.Mock(), callback=callback):
-            pass
-
-        func.assert_called_once(42, foo="bar")
+        try:
+            with managed(mock.Mock(), callback=callback):
+                raise Exception
+        except:
+            func.assert_called_once_with(42, foo="bar")
 
     def test_session_is_closed_on_return(self):
         real_session = mock.Mock()