diff options
author | Florian Schmaus <flow@gentoo.org> | 2024-01-10 09:57:24 +0100 |
---|---|---|
committer | Florian Schmaus <flow@gentoo.org> | 2024-01-10 09:59:05 +0100 |
commit | 3f4600258f86b09fb779199cbf7df69da45fb354 (patch) | |
tree | f35bc518e110bbd5d8ad1a19b3ea44dfb33aa230 /net-analyzer | |
parent | net-analyzer/pontos: new package, add 23.12.3 (diff) | |
download | gentoo-3f4600258f86b09fb779199cbf7df69da45fb354.tar.gz gentoo-3f4600258f86b09fb779199cbf7df69da45fb354.tar.bz2 gentoo-3f4600258f86b09fb779199cbf7df69da45fb354.zip |
net-analyzer/pontos: drop patch, use EPYTEST_DESELECT and pytest runner
Furthermore, add test_git_error, which seems to fail if there is a git
above the portage's package temp directory.
Also drop the unnecessary definition of src_prepare.
Signed-off-by: Florian Schmaus <flow@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/pontos/files/pontos-23.12.3-remove-tests.patch | 61 | ||||
-rw-r--r-- | net-analyzer/pontos/pontos-23.12.3.ebuild | 15 |
2 files changed, 6 insertions, 70 deletions
diff --git a/net-analyzer/pontos/files/pontos-23.12.3-remove-tests.patch b/net-analyzer/pontos/files/pontos-23.12.3-remove-tests.patch deleted file mode 100644 index ff17ea3a422c..000000000000 --- a/net-analyzer/pontos/files/pontos-23.12.3-remove-tests.patch +++ /dev/null @@ -1,61 +0,0 @@ -# Remove tests with a reference to system tmp directory -# Patch by Giuseppe Foti - ---- a/tests/version/commands/test_java.py -+++ b/tests/version/commands/test_java.py -@@ -154,17 +154,6 @@ class GetCurrentJavaVersionCommandTestCase(unittest.TestCase): - - version_file_path.unlink() - -- def test_getting_version_without_version_config(self): -- exp_err_msg = ( -- r"No /tmp/.*/upgradeVersion\.json config file found\. " -- r"This file is required for pontos" -- ) -- with temp_directory(change_into=True), self.assertRaisesRegex( -- VersionError, -- exp_err_msg, -- ): -- JavaVersionCommand(SemanticVersioningScheme).get_current_version() -- - - class VerifyJavaVersionCommandTestCase(unittest.TestCase): - def test_verify_version(self): -@@ -196,37 +185,6 @@ class VerifyJavaVersionCommandTestCase(unittest.TestCase): - readme_file_path.unlink() - properties_file_path.unlink() - -- def test_verify_version_does_not_match(self): -- exp_err_msg = ( -- r"Provided version 2023\.9\.4 does not match the " -- + r"current version 2023\.9\.3 " -- + r"in '/tmp/.*/upgradeVersion\.json'" -- ) -- -- with temp_directory(change_into=True), self.assertRaisesRegex( -- VersionError, -- exp_err_msg, -- ): -- version_file_path = Path("upgradeVersion.json") -- version_file_path.write_text( -- TEMPLATE_UPGRADE_VERSION_SINGLE_JSON, encoding="utf-8" -- ) -- -- version = "2023.9.3" -- new_version = "2023.9.4" -- readme_file_path = Path("README.md") -- readme_file_path.write_text( -- TEMPLATE_UPGRADE_VERSION_MARKDOWN.format(version), -- encoding="utf-8", -- ) -- -- JavaVersionCommand(SemanticVersioningScheme).verify_version( -- SemanticVersioningScheme.parse_version(new_version) -- ) -- -- version_file_path.unlink() -- readme_file_path.unlink() -- - - class UpdateJavaVersionCommandTestCase(unittest.TestCase): - def test_update_version(self): diff --git a/net-analyzer/pontos/pontos-23.12.3.ebuild b/net-analyzer/pontos/pontos-23.12.3.ebuild index 4fb3b9fb5680..6d1c9629e587 100644 --- a/net-analyzer/pontos/pontos-23.12.3.ebuild +++ b/net-analyzer/pontos/pontos-23.12.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -34,13 +34,10 @@ RDEPEND=" DEPEND="${RDEPEND}" -PATCHES=( - # Removing tests with a reference to system tmp directory - "${FILESDIR}"/pontos-23.12.3-remove-tests.patch +EPYTEST_DESELECT=( + tests/git/test_git.py::GitExtendedTestCase::test_git_error + tests/version/commands/test_java.py::GetCurrentJavaVersionCommandTestCase::test_getting_version_without_version_config + tests/version/commands/test_java.py::VerifyJavaVersionCommandTestCase::test_verify_version_does_not_match ) -distutils_enable_tests unittest - -src_prepare() { - distutils-r1_src_prepare -} +distutils_enable_tests pytest |