96069eb892641bab92715e353af443053ef54014,dit/utils/tests/test_units.py,,test_dit,#,43

Before Change


    d = Distribution(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], [1/10]*10)
    ditParams["units"] = True
    h = entropy(d)
    ditParams["units"] = False
    true = ureg.Quantity(1, ureg.dit)
    assert h == pytest.approx(true)

After Change


    d = Distribution(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], [1/10]*10)
    ditParams["units"] = True
    h = entropy(d)
    reset_params()
    true = ureg.Quantity(1, ureg.dit)
    assert h == pytest.approx(true)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: dit/dit
Commit Name: 96069eb892641bab92715e353af443053ef54014
Time: 2018-02-26
Author: ryangregoryjames@gmail.com
File Name: dit/utils/tests/test_units.py
Class Name:
Method Name: test_dit


Project Name: dit/dit
Commit Name: 96069eb892641bab92715e353af443053ef54014
Time: 2018-02-26
Author: ryangregoryjames@gmail.com
File Name: dit/utils/tests/test_units.py
Class Name:
Method Name: test_bit


Project Name: dit/dit
Commit Name: 96069eb892641bab92715e353af443053ef54014
Time: 2018-02-26
Author: ryangregoryjames@gmail.com
File Name: dit/utils/tests/test_units.py
Class Name:
Method Name: test_nat


Project Name: dit/dit
Commit Name: 96069eb892641bab92715e353af443053ef54014
Time: 2018-02-26
Author: ryangregoryjames@gmail.com
File Name: dit/utils/tests/test_units.py
Class Name:
Method Name: test_cc