[arch-commits] Commit in python-doublex/repos/community-staging-any (3 files)
Evangelos Foutras
foutrelis at archlinux.org
Wed Jul 18 04:29:52 UTC 2018
Date: Wednesday, July 18, 2018 @ 04:29:52
Author: foutrelis
Revision: 361707
archrelease: copy trunk to community-staging-any
Added:
python-doublex/repos/community-staging-any/PKGBUILD
(from rev 361706, python-doublex/trunk/PKGBUILD)
python-doublex/repos/community-staging-any/python37-async.patch
(from rev 361706, python-doublex/trunk/python37-async.patch)
Deleted:
python-doublex/repos/community-staging-any/PKGBUILD
----------------------+
PKGBUILD | 108 +++++++++++++++++++++++++------------------------
python37-async.patch | 63 ++++++++++++++++++++++++++++
2 files changed, 119 insertions(+), 52 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2018-07-18 04:29:48 UTC (rev 361706)
+++ PKGBUILD 2018-07-18 04:29:52 UTC (rev 361707)
@@ -1,52 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgbase=python-doublex
-pkgname=('python-doublex' 'python2-doublex')
-pkgver=1.8.4
-pkgrel=3
-pkgdesc="Powerful test doubles framework for Python"
-arch=('any')
-license=('GPL')
-url="https://github.com/davidvilla/python-doublex"
-makedepends=('python-setuptools' 'python2-setuptools' 'python-pyhamcrest' 'python2-pyhamcrest' 'git')
-checkdepends=('python-nose' 'python2-nose')
-source=("git+https://github.com/davidvilla/python-doublex.git#tag=v$pkgver")
-sha512sums=('SKIP')
-
-prepare() {
- cp -a python-doublex{,-py2}
-}
-
-build() {
- cd "$srcdir"/python-doublex
- python setup.py build
-
- cd "$srcdir"/python-doublex-py2
- python2 setup.py build
-}
-
-check() { (
- cd "$srcdir"/python-doublex
- python setup.py test
-
- cd "$srcdir"/python-doublex-py2
- python2 setup.py test
- ) || warning "Tests failed as expected"
-}
-
-package_python-doublex() {
- depends=('python-pyhamcrest')
-
- cd python-doublex
- python setup.py install --root="$pkgdir" --optimize=1
- rm "$pkgdir"/usr/README.rst
-}
-
-package_python2-doublex() {
- depends=('python2-pyhamcrest')
-
- cd python-doublex-py2
- python2 setup.py install --root="$pkgdir" --optimize=1
- rm "$pkgdir"/usr/README.rst
-}
Copied: python-doublex/repos/community-staging-any/PKGBUILD (from rev 361706, python-doublex/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2018-07-18 04:29:52 UTC (rev 361707)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-doublex
+pkgname=('python-doublex' 'python2-doublex')
+pkgver=1.8.4
+pkgrel=4
+pkgdesc="Powerful test doubles framework for Python"
+arch=('any')
+license=('GPL')
+url="https://github.com/davidvilla/python-doublex"
+makedepends=('python-setuptools' 'python2-setuptools' 'python-pyhamcrest' 'python2-pyhamcrest' 'git')
+checkdepends=('python-nose' 'python2-nose')
+source=("git+https://github.com/davidvilla/python-doublex.git#tag=v$pkgver"
+ python37-async.patch)
+sha512sums=('SKIP'
+ 'a2b61482cf0925b3d01cbfaa959297a1c9e52106f017a4685c61e3f8c952b131eff0e11b6fe3c8444083230be561d30b7e6647c555c602ef0c66eebda9b06811')
+
+prepare() {
+ # https://github.com/davidvilla/python-doublex/issues/7
+ patch -d python-doublex -Np1 < python37-async.patch
+ cp -a python-doublex{,-py2}
+}
+
+build() {
+ cd "$srcdir"/python-doublex
+ python setup.py build
+
+ cd "$srcdir"/python-doublex-py2
+ python2 setup.py build
+}
+
+check() { (
+ cd "$srcdir"/python-doublex
+ python setup.py test
+
+ cd "$srcdir"/python-doublex-py2
+ python2 setup.py test
+ ) || warning "Tests failed as expected"
+}
+
+package_python-doublex() {
+ depends=('python-pyhamcrest')
+
+ cd python-doublex
+ python setup.py install --root="$pkgdir" --optimize=1
+ rm "$pkgdir"/usr/README.rst
+}
+
+package_python2-doublex() {
+ depends=('python2-pyhamcrest')
+
+ cd python-doublex-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ rm "$pkgdir"/usr/README.rst
+}
Copied: python-doublex/repos/community-staging-any/python37-async.patch (from rev 361706, python-doublex/trunk/python37-async.patch)
===================================================================
--- python37-async.patch (rev 0)
+++ python37-async.patch 2018-07-18 04:29:52 UTC (rev 361707)
@@ -0,0 +1,63 @@
+diff --git a/doublex/matchers.py b/doublex/matchers.py
+index e6ccf3c..2ecc987 100644
+--- a/doublex/matchers.py
++++ b/doublex/matchers.py
+@@ -97,7 +97,7 @@ class MethodCalled(OperationMatcher):
+
+ if self._async_timeout:
+ if self._times != any_time:
+- raise WrongApiUsage("'times' and 'async' are exclusive")
++ raise WrongApiUsage("'times' and 'wait' are exclusive")
+ self.method._event.wait(self._async_timeout)
+
+ return method._was_called(self.context, self._times)
+@@ -126,7 +126,7 @@ class MethodCalled(OperationMatcher):
+ self.context.check_some_args = True
+ return self
+
+- def async(self, timeout):
++ def wait(self, timeout):
+ self._async_timeout = timeout
+ return self
+
+diff --git a/doublex/test/async_race_condition_test.py b/doublex/test/async_race_condition_test.py
+index c16e3a3..375a5cf 100644
+--- a/doublex/test/async_race_condition_test.py
++++ b/doublex/test/async_race_condition_test.py
+@@ -36,4 +36,4 @@ class AsyncTests(unittest.TestCase):
+ sut.some_method()
+
+ # then
+- assert_that(spy.write, called().async(1))
++ assert_that(spy.write, called().wait(1))
+diff --git a/doublex/test/unit_tests.py b/doublex/test/unit_tests.py
+index d1e1b6d..378fe94 100644
+--- a/doublex/test/unit_tests.py
++++ b/doublex/test/unit_tests.py
+@@ -1340,7 +1340,7 @@ class AsyncTests(TestCase):
+ sut.send_data()
+
+ # then
+- assert_that(spy.write, called().async(timeout=1))
++ assert_that(spy.write, called().wait(timeout=1))
+
+ def test_spy_async_support_1_call_only(self):
+ # given
+@@ -1353,7 +1353,7 @@ class AsyncTests(TestCase):
+
+ # then
+ with self.assertRaises(WrongApiUsage):
+- assert_that(spy.write, called().async(timeout=1).with_args(3).times(2))
++ assert_that(spy.write, called().wait(timeout=1).with_args(3).times(2))
+
+ def test_spy_async_stubbed(self):
+ # given
+@@ -1366,7 +1366,7 @@ class AsyncTests(TestCase):
+ sut.send_data(3)
+
+ # then
+- assert_that(spy.write, called().async(timeout=1))
++ assert_that(spy.write, called().wait(timeout=1))
+
+
+ # new on 1.7
More information about the arch-commits
mailing list