Skip to content
Snippets Groups Projects
Commit 3a5dd444 authored by Maël Madon's avatar Maël Madon
Browse files

some very simple tests

parent 373b8e6f
Branches
No related tags found
No related merge requests found
*__pycache__
\ No newline at end of file
*__pycache__
test-out
.vscode
\ No newline at end of file
This diff is collapsed.
from batmenTools.swf2batsim_split_by_user import generate_workload
from batmenTools.swf_filter import filter_workload
import os.path, sys, subprocess
input_swf=os.path.abspath("test/input/mock.swf")
output_dir = os.path.abspath("test-out")
if not os.path.exists(output_dir):
os.makedirs(output_dir)
def test_split_by_user():
"""Very simple test if split_by_user works without error"""
generate_workload(input_swf, output_folder=output_dir)
def test_CLI():
"""Very simple test of the CLI of our different tools"""
subprocess.run([sys.executable, "batmenTools/swf2batsim_split_by_user.py",
input_swf, output_dir], check=True)
subprocess.run([sys.executable, "batmenTools/swf_filter.py",
input_swf, "-o", f"{output_dir}/bla.swf"], check=True)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment