tests: fixed test_cycle_basis_matrix that wasn't regenerating the graph