def test_k_residual_index_of_trivial_graph_is_1(self): G = gp.trivial_graph() assert (gp.k_residual_index(G) == 1)
def test_empty_set_is_not_power_dominating_set_of_trivial_graph(self): G = gp.trivial_graph() assert (gp.is_power_dominating_set(G, set()) == False)
def test_single_vertex_is_2_independent_set(): G = gp.trivial_graph() assert (gp.is_k_independent_set(G, [0], 2) is True)
def test_2_independence_number_of_trivial_graph_is_1(): G = gp.trivial_graph() assert (gp.k_independence_number(G, 2) == 1)
def test_empty_set_is_2_independent_set_of_trivial_graph(): G = gp.trivial_graph() assert (gp.is_k_independent_set(G, set(), 2) is True)
def test_non_integral_value_raises_TypeError_is_k_regular(self): with pytest.raises(TypeError, message="Expected TypeError when passed non-integral value for k"): G = gp.trivial_graph() gp.is_k_regular(G, 1.5)
def test_total_zero_forcing_num_of_trivial_graph_is_None(self): G = gp.trivial_graph() assert(gp.total_zero_forcing_number(G) == None)