aboutsummaryrefslogtreecommitdiff
path: root/test/test_general.py
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2026-07-07 23:30:52 +0200
committerPaul Oliver <contact@pauloliver.dev>2026-07-07 23:30:52 +0200
commita1569a33cec28b2ea874ae02fcf5863454586b30 (patch)
tree4ff6ef1ab200cc9dafe86fd832041ea623976eb1 /test/test_general.py
parent55928b51596de4cd1b7a2783529ecda3ff3087ce (diff)
data-tests (WIP)more_tests
Diffstat (limited to 'test/test_general.py')
-rw-r--r--test/test_general.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/test_general.py b/test/test_general.py
index 43f3635..edd7328 100644
--- a/test/test_general.py
+++ b/test/test_general.py
@@ -11,7 +11,7 @@ class SalisTest(unittest.TestCase):
def tearDown(self):
self.tempdir.cleanup()
- def file_list_new(self, name):
+ def files_on_new(self, name):
return [
os.path.join(self.tempdir.name, name, name),
os.path.join(self.tempdir.name, name, f"{name}.sqlite3"),
@@ -20,6 +20,9 @@ class SalisTest(unittest.TestCase):
os.path.join(self.tempdir.name, name, "evas", f"evas-{0:016x}"),
]
+ def assert_equal(self, v1, v2):
+ assert v1 == v2, f"{v1} != {v2}"
+
def assert_file_list_exists(self, files):
for file in files:
assert os.path.isfile(file), f"{file} does not exist"
@@ -33,12 +36,12 @@ class SalisTest(unittest.TestCase):
return subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, text=True)
@staticmethod
- def run_ui_test(anc, anc_path, ui, ui_path, vm_arch, clones=1, cores=1, name="def.sim"):
+ def run_ui_test(anc, anc_path, ui, ui_path, vm_arch, clones=1, cores=1, mvec_pow=20, name="def.sim", data_push_pow=28, sync_pow=20, **kwargs):
def test_decorator(test_case):
def test_wrapper(self):
- cmd = f"./salis.py new -a{anc} -A{anc_path} -C{clones} -c{cores} -H{self.tempdir.name} -n{name} -u{ui} -U{ui_path} -v{vm_arch}"
+ cmd = f"./salis.py new -a{anc} -A{anc_path} -C{clones} -c{cores} -d{data_push_pow} -H{self.tempdir.name} -m{mvec_pow} -n{name} -u{ui} -U{ui_path} -v{vm_arch} -y{sync_pow}"
subprocess.run(cmd.split(), check=True, stdout=subprocess.DEVNULL)
- self.assert_file_list_exists(self.file_list_new(name))
+ self.assert_file_list_exists(self.files_on_new(name))
test_case(self)
return test_wrapper