flownetpy.tests package

Submodules

flownetpy.tests.test_kuramoto module

class flownetpy.tests.test_kuramoto.TestCore[source]
setUp()[source]
test_2node_fixed_point(dK=HypothesisProvided(value=floats(min_value=0.0001, max_value=0.1)))[source]

Fixed point should be 1

test_2node_unstable(dK=HypothesisProvided(value=floats(min_value=0.0001, max_value=0.1)))[source]
test_even_ring_fixed_point(dK=HypothesisProvided(value=floats(min_value=0.0001, max_value=0.1)))[source]

The flows should look like -0.5 0.5 -0.5 0.5...

test_even_ring_unstable(dK=HypothesisProvided(value=floats(min_value=0.0001, max_value=0.1)))[source]
test_odd_ring_fixed_point(dK=HypothesisProvided(value=floats(min_value=0.0001, max_value=0.1)))[source]

The flows should look like 1 -1 1 -1 ...

test_odd_ring_unstable(dK=HypothesisProvided(value=floats(min_value=0.0001, max_value=0.1)))[source]
class flownetpy.tests.test_kuramoto.TestHelperfuncs[source]

Test the helpedr functions

test_mod_pi_even_pi(m=HypothesisProvided(value=integers(min_value=-10000, max_value=10000)))[source]

_mod_pi(even_multiple_of_pi)==0

test_mod_pi_odd_pi(m=HypothesisProvided(value=integers(min_value=-10000, max_value=10000)))[source]

_mod_pi(odd_multiple_of_pi)==+/- 1

test_mod_pi_range(x=HypothesisProvided(value=floats(min_value=-10000, max_value=10000)))[source]
test_mod_pi_sanity(x=HypothesisProvided(value=lists(elements=floats(min_value=-10000, max_value=10000), min_size=1, max_size=100)))[source]
test_omega_equispaced(delta=HypothesisProvided(value=floats(min_value=-1.5707963267948966, max_value=1.5707963267948966)), size=HypothesisProvided(value=integers(min_value=4, max_value=100)))[source]

checks omega of a ring network with equispaced thetas

test_random_stableop_initguess(size=HypothesisProvided(value=integers(min_value=3)))[source]

this function should return angles with |successive difference| < pi/2

flownetpy.tests.test_linear module

class flownetpy.tests.test_linear.TestCore[source]
setUp()[source]
test_2node_fixed_point(K=HypothesisProvided(value=floats(min_value=0.0001, max_value=10)))[source]

Fixed point should be 1

test_even_ring_fixed_point(K=HypothesisProvided(value=floats(min_value=0.0001, max_value=10)))[source]

The flows should look like -0.5 0.5 -0.5 0.5...

test_odd_ring_fixed_point(K=HypothesisProvided(value=floats(min_value=0.0001, max_value=10)))[source]

The flows should look like 1 -1 1 -1 ...

flownetpy.tests.test_tools module

class flownetpy.tests.test_tools.TestFlowDict[source]
test_sanity(data=HypothesisProvided(value=dictionaries(keys=frozensets(elements=integers(min_value=-10000, max_value=10000), min_size=2, max_size=2), values=floats(min_value=-10000, max_value=10000))))[source]

tests that FlowDict[(v ,u)] = -FlowDict[(u, v)]

Module contents

flownetpy

A python package for flow network simulations

Navigation


Related Topics

Fork me on GitHub