mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
Updated for docstring and code quality
This commit is contained in:
parent
743bf89081
commit
3ffadaffa6
1 changed files with 39 additions and 13 deletions
|
@ -1,44 +1,70 @@
|
|||
import unittest
|
||||
|
||||
|
||||
from slpkg.load_data import LoadData
|
||||
|
||||
|
||||
class TestSBoQueries(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
""" Test for SBo queries.
|
||||
"""
|
||||
|
||||
def setUp(self) -> None:
|
||||
load = LoadData()
|
||||
self.data: dict = load.load('sbo')
|
||||
self.name: str = 'slpkg'
|
||||
|
||||
def test_slackbuild(self):
|
||||
self.assertTrue(True, self.data[self.name])
|
||||
def test_slackbuild(self) -> None:
|
||||
""" Test slackbuild.
|
||||
"""
|
||||
sbo_name: bool = True
|
||||
self.assertTrue(sbo_name, self.data[self.name])
|
||||
|
||||
def test_location(self):
|
||||
def test_location(self) -> None:
|
||||
""" Test location.
|
||||
"""
|
||||
self.assertEqual('system', self.data[self.name]['location'])
|
||||
|
||||
def test_sources_x86(self):
|
||||
def test_sources_x86(self) -> None:
|
||||
""" Test sources for x86.
|
||||
"""
|
||||
self.assertEqual(['https://gitlab.com/dslackw/slpkg/-/archive'
|
||||
'/4.9.8/slpkg-4.9.8.tar.gz'], self.data[self.name]['download'])
|
||||
'/4.9.8/slpkg-4.9.8.tar.gz'], self.data[self.name]['download'])
|
||||
|
||||
def test_sources_x86_64(self):
|
||||
def test_sources_x86_64(self) -> None:
|
||||
""" Test sources for x64.
|
||||
"""
|
||||
self.assertEqual([], self.data[self.name]['download64'])
|
||||
|
||||
def test_requires(self):
|
||||
def test_requires(self) -> None:
|
||||
""" Test for requires.
|
||||
"""
|
||||
self.assertEqual(['python3-build', 'python3-pythondialog'],
|
||||
self.data[self.name]['requires'])
|
||||
|
||||
def test_version(self):
|
||||
def test_version(self) -> None:
|
||||
""" Test for version.
|
||||
"""
|
||||
self.assertEqual('5.0.4', self.data[self.name]['version'])
|
||||
|
||||
def test_checksum_x86(self):
|
||||
def test_checksum_x86(self) -> None:
|
||||
""" Test checksum for x86.
|
||||
"""
|
||||
self.assertListEqual(['9f9cf626d7246202886774c6cbc2cccf'], self.data[self.name]['md5sum'])
|
||||
|
||||
def test_checksum_x86_64(self):
|
||||
def test_checksum_x86_64(self) -> None:
|
||||
""" Test checksum for x64.
|
||||
"""
|
||||
self.assertListEqual([], self.data[self.name]['md5sum64'])
|
||||
|
||||
def test_files(self):
|
||||
def test_files(self) -> None:
|
||||
""" Test for files.
|
||||
"""
|
||||
self.assertEqual(5, len(self.data[self.name]['files']))
|
||||
|
||||
def test_description(self):
|
||||
def test_description(self) -> None:
|
||||
""" Test for description.
|
||||
"""
|
||||
self.assertEqual('slpkg (Slackware Packaging Tool)', self.data[self.name]['description'])
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue