From 90c84e9b48fc9d1d7c709077cb076498f88e5c07 Mon Sep 17 00:00:00 2001 From: gasinvein Date: Mon, 27 Jun 2022 22:17:48 +0300 Subject: [PATCH] tests: Drop htmlchecker separate pattern test --- tests/org.x.xeyes.yml | 11 ----------- tests/test_htmlchecker.py | 27 --------------------------- 2 files changed, 38 deletions(-) diff --git a/tests/org.x.xeyes.yml b/tests/org.x.xeyes.yml index 11fd65e8..48d3897b 100644 --- a/tests/org.x.xeyes.yml +++ b/tests/org.x.xeyes.yml @@ -1,16 +1,5 @@ id: org.x.xeyes modules: - - name: xeyes - sources: - - type: archive - url: https://www.x.org/releases/individual/app/xeyes-1.1.0.tar.bz2 - sha256: "0000000000000000000000000000000000000000000000000000000000000000" - x-checker-data: - type: html - url: https://www.x.org/releases/individual/app/ - version-pattern: xeyes-([\d\.-]+).tar.bz2 - url-pattern: (xeyes-[\d\.-]+.tar.bz2) - - name: ico sources: - type: archive diff --git a/tests/test_htmlchecker.py b/tests/test_htmlchecker.py index 926fd605..77cf71ee 100755 --- a/tests/test_htmlchecker.py +++ b/tests/test_htmlchecker.py @@ -77,9 +77,6 @@ def setUp(self): async def test_check(self): checker = ManifestChecker(TEST_MANIFEST) ext_data = await checker.check() - self._test_separate_patterns( - self._find_by_filename(ext_data, "xeyes-1.1.0.tar.bz2") - ) self._test_check_with_url_template( self._find_by_filename(ext_data, "ico-1.0.4.tar.bz2") ) @@ -92,30 +89,6 @@ async def test_check(self): self._test_no_match(self._find_by_filename(ext_data, "libFS-1.0.7.tar.bz2")) self._test_invalid_url(self._find_by_filename(ext_data, "libdoesntexist.tar")) - def _test_separate_patterns(self, data): - self.assertIsNotNone(data) - self.assertRegex(data.filename, r"xeyes-[\d\.-]+.tar.bz2") - self.assertIsNotNone(data.new_version) - self.assertRegex( - data.new_version.url, - r"^https?://www.x.org/releases/individual/app/xeyes-[\d\.-]+.tar.bz2", # noqa: E501 - ) - self.assertNotEqual(data.new_version.url, data.current_version.url) - self.assertIsNotNone(data.new_version.version) - self.assertLessEqual( - LooseVersion("1.1.0"), LooseVersion(data.new_version.version) - ) - self.assertIsInstance(data.new_version.size, int) - self.assertGreater(data.new_version.size, 0) - self.assertIsNotNone(data.new_version.checksum) - self.assertIsInstance(data.new_version.checksum, MultiDigest) - self.assertNotEqual( - data.new_version.checksum, - MultiDigest( - sha256="0000000000000000000000000000000000000000000000000000000000000000" - ), - ) - def _test_check_with_url_template(self, data): self.assertIsNotNone(data) self.assertEqual(data.filename, "ico-1.0.4.tar.bz2")