aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2023-01-31 18:44:15 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2023-01-31 18:44:15 +0200
commitac309733f5680c10bf95bf5d7e318e6e4c1d0ee9 (patch)
treec57f3d753cf85e0bbd4a16107454279203d14d9a /testdata
parentchecks: Add a check for Python pkgnames matching PyPI (diff)
downloadpkgcheck-ac309733f5680c10bf95bf5d7e318e6e4c1d0ee9.tar.gz
pkgcheck-ac309733f5680c10bf95bf5d7e318e6e4c1d0ee9.tar.bz2
pkgcheck-ac309733f5680c10bf95bf5d7e318e6e4c1d0ee9.zip
PythonPackageNameCheck: update docs & add tests
Follows: 4438566500fdf116ba36c3c407022e89541867d6 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'testdata')
-rw-r--r--testdata/data/repos/python/PythonPackageNameCheck/PythonMismatchedPackageName/expected.json1
-rw-r--r--testdata/repos/python/dev-python/PythonMismatchedPackageName0/PythonMismatchedPackageName0-0.ebuild9
-rw-r--r--testdata/repos/python/dev-python/PythonMismatchedPackageName0/metadata.xml7
-rw-r--r--testdata/repos/python/dev-python/PythonMismatchedPackageName1/PythonMismatchedPackageName1-0.ebuild9
-rw-r--r--testdata/repos/python/dev-python/PythonMismatchedPackageName1/metadata.xml7
-rw-r--r--testdata/repos/python/dev-python/PythonMismatchedPackageName3/PythonMismatchedPackageName3-0.ebuild9
-rw-r--r--testdata/repos/python/dev-python/PythonMismatchedPackageName3/metadata.xml8
-rw-r--r--testdata/repos/python/dev-python/python-mismatched-package-name/metadata.xml7
-rw-r--r--testdata/repos/python/dev-python/python-mismatched-package-name/python-mismatched-package-name-0.ebuild9
9 files changed, 66 insertions, 0 deletions
diff --git a/testdata/data/repos/python/PythonPackageNameCheck/PythonMismatchedPackageName/expected.json b/testdata/data/repos/python/PythonPackageNameCheck/PythonMismatchedPackageName/expected.json
new file mode 100644
index 00000000..3c85ada5
--- /dev/null
+++ b/testdata/data/repos/python/PythonPackageNameCheck/PythonMismatchedPackageName/expected.json
@@ -0,0 +1 @@
+{"__class__": "PythonMismatchedPackageName", "category": "dev-python", "package": "PythonMismatchedPackageName1", "recommended": "MismatchedPackageName1"}
diff --git a/testdata/repos/python/dev-python/PythonMismatchedPackageName0/PythonMismatchedPackageName0-0.ebuild b/testdata/repos/python/dev-python/PythonMismatchedPackageName0/PythonMismatchedPackageName0-0.ebuild
new file mode 100644
index 00000000..0c3de1e6
--- /dev/null
+++ b/testdata/repos/python/dev-python/PythonMismatchedPackageName0/PythonMismatchedPackageName0-0.ebuild
@@ -0,0 +1,9 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Ebuild with matching name with PyPI"
+HOMEPAGE="https://github.com/pkgcore/pkgcheck"
+LICENSE="BSD"
+SLOT="0"
diff --git a/testdata/repos/python/dev-python/PythonMismatchedPackageName0/metadata.xml b/testdata/repos/python/dev-python/PythonMismatchedPackageName0/metadata.xml
new file mode 100644
index 00000000..07ce2e64
--- /dev/null
+++ b/testdata/repos/python/dev-python/PythonMismatchedPackageName0/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <remote-id type="pypi">PythonMismatchedPackageName0</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/testdata/repos/python/dev-python/PythonMismatchedPackageName1/PythonMismatchedPackageName1-0.ebuild b/testdata/repos/python/dev-python/PythonMismatchedPackageName1/PythonMismatchedPackageName1-0.ebuild
new file mode 100644
index 00000000..450671b5
--- /dev/null
+++ b/testdata/repos/python/dev-python/PythonMismatchedPackageName1/PythonMismatchedPackageName1-0.ebuild
@@ -0,0 +1,9 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Ebuild with not matching name with PyPI"
+HOMEPAGE="https://github.com/pkgcore/pkgcheck"
+LICENSE="BSD"
+SLOT="0"
diff --git a/testdata/repos/python/dev-python/PythonMismatchedPackageName1/metadata.xml b/testdata/repos/python/dev-python/PythonMismatchedPackageName1/metadata.xml
new file mode 100644
index 00000000..14221de3
--- /dev/null
+++ b/testdata/repos/python/dev-python/PythonMismatchedPackageName1/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <remote-id type="pypi">MismatchedPackageName1</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/testdata/repos/python/dev-python/PythonMismatchedPackageName3/PythonMismatchedPackageName3-0.ebuild b/testdata/repos/python/dev-python/PythonMismatchedPackageName3/PythonMismatchedPackageName3-0.ebuild
new file mode 100644
index 00000000..6126af5d
--- /dev/null
+++ b/testdata/repos/python/dev-python/PythonMismatchedPackageName3/PythonMismatchedPackageName3-0.ebuild
@@ -0,0 +1,9 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Ebuild with multiple not matching name with PyPI"
+HOMEPAGE="https://github.com/pkgcore/pkgcheck"
+LICENSE="BSD"
+SLOT="0"
diff --git a/testdata/repos/python/dev-python/PythonMismatchedPackageName3/metadata.xml b/testdata/repos/python/dev-python/PythonMismatchedPackageName3/metadata.xml
new file mode 100644
index 00000000..3601354e
--- /dev/null
+++ b/testdata/repos/python/dev-python/PythonMismatchedPackageName3/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <remote-id type="pypi">MismatchedPackageName3</remote-id>
+ <remote-id type="pypi">PackageName3</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/testdata/repos/python/dev-python/python-mismatched-package-name/metadata.xml b/testdata/repos/python/dev-python/python-mismatched-package-name/metadata.xml
new file mode 100644
index 00000000..10320a70
--- /dev/null
+++ b/testdata/repos/python/dev-python/python-mismatched-package-name/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <upstream>
+ <remote-id type="pypi">python.mismatched.package.name</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/testdata/repos/python/dev-python/python-mismatched-package-name/python-mismatched-package-name-0.ebuild b/testdata/repos/python/dev-python/python-mismatched-package-name/python-mismatched-package-name-0.ebuild
new file mode 100644
index 00000000..0c3de1e6
--- /dev/null
+++ b/testdata/repos/python/dev-python/python-mismatched-package-name/python-mismatched-package-name-0.ebuild
@@ -0,0 +1,9 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Ebuild with matching name with PyPI"
+HOMEPAGE="https://github.com/pkgcore/pkgcheck"
+LICENSE="BSD"
+SLOT="0"