|
import unittest |
|
from result_data_processor import ResultDataProcessor |
|
import pandas as pd |
|
|
|
class TestResultDataProcessor(unittest.TestCase): |
|
|
|
def setUp(self): |
|
self.processor = ResultDataProcessor() |
|
|
|
|
|
def test_process_data(self): |
|
data = self.processor.data |
|
self.assertIsInstance(data, pd.DataFrame) |
|
|
|
|
|
def test_columns(self): |
|
data = self.processor.data |
|
self.assertIn('Parameters', data.columns) |
|
self.assertIn('MMLU_average', data.columns) |
|
|
|
self.assertEqual(len(data.columns), 64) |
|
|
|
|
|
def test_rows(self): |
|
data = self.processor.data |
|
self.assertEqual(len(data), 998) |
|
|
|
|
|
def test_mc1(self): |
|
data = self.processor.data |
|
self.assertIn('harness|truthfulqa:mc1', data.columns) |
|
|
|
|
|
def test_truthfulqa_mc(self): |
|
data = self.processor.data |
|
self.assertNotIn('truthfulqa:mc', data.columns) |
|
|
|
|
|
def test_mc1_outliers(self): |
|
data = self.processor.data |
|
mc1 = data['harness|truthfulqa:mc1'] |
|
self.assertLess(mc1.max(), 1.0) |
|
self.assertGreater(mc1.min(), 0.0) |
|
|
|
|
|
|
|
def test_organization(self): |
|
data = self.processor.data |
|
self.assertIn('organization', data.columns) |
|
|
|
if __name__ == '__main__': |
|
unittest.main() |