Skip to content
Snippets Groups Projects
Commit cc2f3e7c authored by Celeste's avatar Celeste
Browse files

main/py3-future: fix test_ftp mime type expectation

parent 994c0190
No related branches found
No related tags found
1 merge request!64690main/py3-future: fix test_ftp mime type expectation
Pipeline #228883 skipped
......@@ -13,7 +13,9 @@ depends="python3"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/f/future/future-$pkgver.tar.gz"
source="$pkgname-$pkgver.tar.gz::https://pypi.io/packages/source/f/future/future-$pkgver.tar.gz
test_ftp.patch
"
builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-future" # Backwards compatibility
......@@ -38,4 +40,5 @@ package() {
sha512sums="
8e28d53172e3ae7b3b27c424a48fb698a6e86bf1c648cdf74e7fd57d34901a9bda18429fe4e176d70be67fc6c80b7f961b3021356594e38b5f294406af40bc61 py3-future-1.0.0.tar.gz
e045ba2f5a3d29ab78b75f6211e4b40ec8333d6fcb53bf09803fedecc0728f929753aa7745eda3275fcbc7087bbe22b1e2df455e6750e80b608fdc2a1a1e67f0 test_ftp.patch
"
Adapted from https://github.com/python-mechanize/mechanize/commit/1324b09b661aaac7d4cdc7e1e9d49e1c3851db2c
--- a/tests/test_future/test_urllib2.py
+++ b/tests/test_future/test_urllib2.py
@@ -709,7 +709,8 @@
["foo", "bar"], "", None),
("ftp://localhost/baz.gif;type=a",
"localhost", ftplib.FTP_PORT, "", "", "A",
- [], "baz.gif", None),
+ [], "baz.gif",
+ "image/gif" if sys.version_info >= (3, 11) else None),
("ftp://localhost/baz.gif",
"localhost", ftplib.FTP_PORT, "", "", "I",
[], "baz.gif", "image/gif"),
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment