sweetpea.core.tests module
This module provides tests for SweetPea’s Core framework.
- sweetpea.core.tests.compute_soln_full_adder(incoming, c_index, s_index)
- sweetpea.core.tests.ripple_carry_dimacs(num_digits)
- sweetpea.core.tests.pop_count_dimacs(num_digits)
- sweetpea.core.tests.permute_complements(xs, to_position=None, complement_func=<built-in function invert>)
Given a list of elements, computes a list of each possible permutation of that list with complements. That is, given a list like:
[1, 2, 3]
permute_complements will return:
- [[1, 2, 3], [-1, 2, 3], [1, -2, 3], [-1, -2, 3],
[1, 2, -3], [-1, 2, -3], [1, -2, -3], [-1, -2, -3]]
- sweetpea.core.tests.assert_k_of_n_dimacs(num_digits, k)
- sweetpea.core.tests.assert_all_k_of_n_dimacs(num_digits)
- sweetpea.core.tests.pop_count_k_less_than_n_dimacs(num_digits, k)