Ad
  • Custom User Avatar

    @guumaster
    Anything in the test cases tab of the window on the lower right hand corner of the kata editor runs when warriors click attempt. So for python, you could try something like this:

    from random import ... # pick the random methods you want to use
    
    def ref_solution(num_list):
        # the exact same code you used in the complete solution tab of the window on the lower left hand corner
    
    Test.it("Random Tests")
    # set your parameters. Maybe a max value, a min length.
    max_val = 10000
    min_len = 20
    for _ in 100:
        num_list = # some function using methods from random to generate a list using parameters above
        test.assert_equals(sort_by_binary_ones(num_list), ref_solution(num_list))
    
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution