Ad
  • Custom User Avatar
  • Custom User Avatar

    I suggest to split the tests like this, and also fix the spelling on Partial

    @test.it('Partial tests 2x2')
    def _():
        test.assert_equals(list(dithering(2, 2)),
                           [(0,0), (1,1), (1,0), (0,1)])
    @test.it('Partial tests 4x4')
    def _():        
        g = dithering(4, 4)
        for i in range(10):
          next(g)
        test.assert_equals(next(g), (3,0))
    
  • Custom User Avatar

    Generator laziness should be tested. Ie, limited prefixes from humongous result sets should be tested, to be returned in finite ( limited ) time.

    Haskell and JS now incorporate tests for 1 element from dither 1e6 1e6 and 2 elements from dither 1e3 1e3, but this could be expanded.

    Python and LC should probably add this testing, and possibly more. ( LC has some problems retaining laziness when exporting to JS for testing. Work in progress. )

    A performance tag may be indicated.

    Note: this is not intended to change the kata, just to explicitly test for specs that were always there.

  • Custom User Avatar

    Kotlin translation ready for review and approval.

  • Custom User Avatar

    Random tests are completely broken

    See here