switch fpdiv/test/test_fp*.py to use unittest
[ieee754fpu.git] / src / ieee754 / fpdiv / test / test_fpdiv_pipe.py
1 """ test of FPDIVMuxInOut
2 """
3
4 from ieee754.fpdiv.pipeline import (FPDIVMuxInOut,)
5 from ieee754.fpcommon.test.fpmux import runfp
6
7 import unittest
8 from sfpy import Float64, Float32, Float16
9 from operator import truediv as div
10
11
12 class TestDivPipe(unittest.TestCase):
13 def test_pipe_div_fp16(self):
14 dut = FPDIVMuxInOut(16, 4)
15 runfp(dut, 16, "test_fpdiv_pipe_fp16", Float16, div)
16
17 def test_pipe_div_fp32(self):
18 dut = FPDIVMuxInOut(32, 4)
19 runfp(dut, 32, "test_fpdiv_pipe_fp32", Float32, div)
20
21 def test_pipe_div_fp64(self):
22 dut = FPDIVMuxInOut(64, 4)
23 runfp(dut, 64, "test_fpdiv_pipe_fp64", Float64, div)
24
25
26 if __name__ == '__main__':
27 unittest.main()