Update tests for struct package

This commit is contained in:
Eric Torres
2019-04-10 18:17:21 -07:00
parent 35167f28c6
commit 94c70b7b2e
3 changed files with 119 additions and 105 deletions

View File

@@ -43,27 +43,6 @@ class TestCreatePackageManager(unittest.TestCase):
def test_create_with_valid_values(self, l):
PackageManager("nothing", "nothing", l)
@given(one_of(none(), booleans(), integers(), dictionaries(text(), text())))
def test_incorrect_cmd_type(self, cmd):
with self.assertRaises(TypeError):
PackageManager("nothing", "nothing", cmd)
def test_empty_cmd(self):
with self.assertRaises(ValueError):
PackageManager("nothing", "nothing", [])
PackageManager("nothing", "nothing", set())
PackageManager("nothing", "nothing", "")
@given(iterables(one_of(none(), booleans(), integers()), min_size=1))
def test_wrong_iterable_element_type(self, cmd):
with self.assertRaises(TypeError):
PackageManager("nothing", "nothing", cmd)
def test_empty_str_in_iterable(self):
with self.assertRaises(ValueError):
PackageManager("nothing", "nothing", [""])
PackageManager("nothing", "nothing", ["pacman", ""])
def tearDown(self):
self.patched_path.stop()
self.patched_subprocess.stop()