Skip to content

Commit

Permalink
data tests run the code
Browse files Browse the repository at this point in the history
  • Loading branch information
cpmpercussion committed Jun 26, 2024
1 parent 268d334 commit 6565f1d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions impsy/tests/test_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from impsy import dataset
import numpy as np
import os


Expand All @@ -8,11 +9,12 @@ def test_log_to_examples():
test_line = "2024-06-01T12:00:00,interface,0.1,0.2,0.3,0.4"
with open(test_log_file, "w") as file:
file.write(test_line)
dataset.transform_log_to_sequence_example(test_log_file, 4)
log = dataset.transform_log_to_sequence_example(test_log_file, 4)
assert(isinstance(log, np.ndarray))
os.remove(test_log_file)


def test_dataset_command():
"""Test the dataset command"""
"""Test the dataset command runs"""
print("Testing dataset function...")
dataset.generate_dataset(dimension=2, source="logs")

0 comments on commit 6565f1d

Please sign in to comment.