stress_at_work_analysis/test/test_esm.py

20 lines
546 B
Python

import unittest
import numpy as np
import pandas as pd
from numpy.random import default_rng
from pandas.testing import assert_series_equal
from features.esm import preprocess_esm
class EsmFeatures(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
cls.esm = pd.read_csv("../data/example_esm.csv", sep=";")
cls.esm["esm_json"] = cls.esm["esm_json"].apply(eval)
def test_preprocess_esm(self):
self.esm_processed = preprocess_esm(self.esm)
self.assertIn("question_id", self.esm_processed)