Skip to content

Commit

Permalink
tests: Drop htmlchecker separate pattern test
Browse files Browse the repository at this point in the history
  • Loading branch information
gasinvein committed Jun 27, 2022
1 parent a47fb9e commit 90c84e9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
11 changes: 0 additions & 11 deletions tests/org.x.xeyes.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
27 changes: 0 additions & 27 deletions tests/test_htmlchecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)
Expand All @@ -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")
Expand Down

0 comments on commit 90c84e9

Please sign in to comment.