Skip to content

Commit

Permalink
community/py-jedi: fix test_os_path_join on aarch64
Browse files Browse the repository at this point in the history
The test takes slightly longer on aarch64 then the test allows.

Issue: davidhalter/jedi#1306
  • Loading branch information
Ikke committed Apr 2, 2019
1 parent 314b24d commit 762ab74
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
6 changes: 4 additions & 2 deletions community/py-jedi/APKBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ arch="noarch"
license="MIT"
makedepends="py3-setuptools python3-dev"
checkdepends="pytest py-parso py-tox"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
adjust-speed-test.patch"
builddir="$srcdir"/$_pkgname-$pkgver
replaces="py3-jedi"

Expand All @@ -30,4 +31,5 @@ package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="b20fc75d909f9b7c6db434f468e7cefd9768991ca72d7026df9c4000805675a979f9e40f75623770df44bf8919a46270bcaa8e28d991a2299c64bc4c60d873fc jedi-0.13.3.tar.gz"
sha512sums="b20fc75d909f9b7c6db434f468e7cefd9768991ca72d7026df9c4000805675a979f9e40f75623770df44bf8919a46270bcaa8e28d991a2299c64bc4c60d873fc jedi-0.13.3.tar.gz
8a33c01f8d9f4f121176b0346759e74ab9847f1803f9d82515826c470822bf35ca5c84c29ac0c65b244457f8a05e26e05f6182337eadaf2aa4acc80a88972e32 adjust-speed-test.patch"
15 changes: 15 additions & 0 deletions community/py-jedi/adjust-speed-test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
On aarch64, this tests takes ~0.4s, which is larger than the default
threshold. Increase it a bit to let this test pass.
diff --git a/test/test_speed.py b/test/test_speed.py
index f3fa7c7b3d..ba5784acc8 100644
--- a/test/test_speed.py
+++ b/test/test_speed.py
@@ -30,7 +30,7 @@ def _check_speed(time_per_run, number=4, run_warm=True):
return decorated


-@_check_speed(0.3)
+@_check_speed(0.5)
def test_os_path_join(Script):
s = "from posixpath import join; join('', '')."
assert len(Script(s).completions()) > 10 # is a str completion

0 comments on commit 762ab74

Please sign in to comment.