import unittest
import ast
from dissect.traits.s03.s03 import s03_curve_function
from dissect.traits.example_curves import curve_names
results = {
    'secp112r2': {
        "{'weight': 1}": {
            'Arithmetic mean': 110.84197998046875,
            'Geometric mean': 110.83241195110318,
            'Quadratic mean': 110.85138630703455,
            'Harmonic mean': 110.82267762075033,
            'Variance': 0.4300206600492227,
            'Standard deviation': 0.2182928591839576}},
    'bn158': {
        "{'weight': 1}": {
            'Arithmetic mean': 156.234619140625,
            'Geometric mean': 156.22746505021271,
            'Quadratic mean': 156.2416814191889,
            'Harmonic mean': 156.22021677284124,
            'Variance': 0.5971950011942893,
            'Standard deviation': 0.24693692858980024}},
    'brainpoolP160r1': {
        "{'weight': 1}": {
            'Arithmetic mean': 158.90948486328125,
            'Geometric mean': 158.90153562008356,
            'Quadratic mean': 158.91786173928077,
            'Harmonic mean': 158.89385786509308,
            'Variance': 87.35668783041672,
            'Standard deviation': 0.7198139393300795}}}


class TestS03(unittest.TestCase):

    def test_auto_generated_secp112r2(self):
        """This test has been auto-generated by gen_unittest"""
        params = ast.literal_eval(
            list(results["secp112r2"].keys())[0]).values()
        computed_result = s03_curve_function(curve_names["secp112r2"], *params)
        self.assertEqual(
            list(
                results["secp112r2"].values())[0],
            computed_result)

    def test_auto_generated_bn158(self):
        """This test has been auto-generated by gen_unittest"""
        params = ast.literal_eval(list(results["bn158"].keys())[0]).values()
        computed_result = s03_curve_function(curve_names["bn158"], *params)
        self.assertEqual(list(results["bn158"].values())[0], computed_result)

    def test_auto_generated_brainpoolP160r1(self):
        """This test has been auto-generated by gen_unittest"""
        params = ast.literal_eval(
            list(results["brainpoolP160r1"].keys())[0]).values()
        computed_result = s03_curve_function(
            curve_names["brainpoolP160r1"], *params)
        self.assertEqual(
            list(
                results["brainpoolP160r1"].values())[0],
            computed_result)


if __name__ == '__main__':
    unittest.main()
    print("Everything passed")

import unittest
import ast
from dissect.traits.s03.s03 import s03_curve_function
from dissect.traits.example_curves import curve_names
results = {
    'secp112r2': {
        "{'weight': 1}": {
            'Arithmetic mean': 110.84197998046875,
            'Geometric mean': 110.83241195110318,
            'Quadratic mean': 110.85138630703455,
            'Harmonic mean': 110.82267762075033,
            'Variance': 0.4300206600492227,
            'Standard deviation': 0.2182928591839576}},
    'bn158': {
        "{'weight': 1}": {
            'Arithmetic mean': 156.234619140625,
            'Geometric mean': 156.22746505021271,
            'Quadratic mean': 156.2416814191889,
            'Harmonic mean': 156.22021677284124,
            'Variance': 0.5971950011942893,
            'Standard deviation': 0.24693692858980024}},
    'brainpoolP160r1': {
        "{'weight': 1}": {
            'Arithmetic mean': 158.90948486328125,
            'Geometric mean': 158.90153562008356,
            'Quadratic mean': 158.91786173928077,
            'Harmonic mean': 158.89385786509308,
            'Variance': 87.35668783041672,
            'Standard deviation': 0.7198139393300795}}}


class TestS03(unittest.TestCase):

    def test_auto_generated_secp112r2(self):
        """This test has been auto-generated by gen_unittest"""
        params = ast.literal_eval(
            list(results["secp112r2"].keys())[0]).values()
        computed_result = s03_curve_function(curve_names["secp112r2"], *params)
        self.assertEqual(
            list(
                results["secp112r2"].values())[0],
            computed_result)

    def test_auto_generated_bn158(self):
        """This test has been auto-generated by gen_unittest"""
        params = ast.literal_eval(list(results["bn158"].keys())[0]).values()
        computed_result = s03_curve_function(curve_names["bn158"], *params)
        self.assertEqual(list(results["bn158"].values())[0], computed_result)

    def test_auto_generated_brainpoolP160r1(self):
        """This test has been auto-generated by gen_unittest"""
        params = ast.literal_eval(
            list(results["brainpoolP160r1"].keys())[0]).values()
        computed_result = s03_curve_function(
            curve_names["brainpoolP160r1"], *params)
        self.assertEqual(
            list(
                results["brainpoolP160r1"].values())[0],
            computed_result)


if __name__ == '__main__':
    unittest.main()
    print("Everything passed")

This test has been auto-generated by gen_unittest This test has been auto-generated by gen_unittest This test has been auto-generated by gen_unittest