Ad
  • Default User Avatar

    thanks :-)

  • Default User Avatar

    APPROVED BY SOMEONE

  • Default User Avatar

    Could anyone approve my GO-Translation ?

  • Default User Avatar

    Thanks for updating the kata, B4B. Since you modified my solution used in validating others' solutions in the tests, I thought at first that it was mutating the input. But it isn't and I don't think that that change is necessary. However, I agree with the other changes that protect the tests from others mutating the input.

  • Default User Avatar

    thanks for the hint ... got it now :-)

  • Custom User Avatar

    done.

    keep in mind that mutating the input is a VERY bad practice. As you just faced it.

  • Custom User Avatar

    the tests are "correct", the problem is that you're mutating the input array. I'll update the kata in a matter of minutes.

    about the buffer problem, it's because the assertions are prinintg all the expected results to the console. That's enough to saturate it, in this kata.

  • Default User Avatar

    could it be that there is something wrong with the random tests ?

        return files[10]
        
        =>
        
        Random test - 50 files
    'I///A' should equal 'N/├── F/│   └── S/├── H/│   ├── D/│   │   └── A/│   ├── a/│   │   └── G/│   │       └── K/│   │           └── Q/│   └── d/│       └── f/│           └── n/│               └── d/│                   └── u/├── I/│   ├── X/│   │   └── q/│   └── A/├── K/│   └── c/│       └── W/├── L/│   ├── H/│   │
    
        ```
        
        
    
  • Default User Avatar

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

  • Default User Avatar

    I do not print anything to the console, also if I run it with (and return [] on the random tests)

    if len(files) > 20:
    return []

    it returns the same error

  • Custom User Avatar

    Closing then.

  • Custom User Avatar

    You're probably printing too much to the console, remove all prints from your code. Also, if all random tests fail, I'd check if you're not mutating the input. Can't help you better because I haven't solved this kata yet.

  • Default User Avatar

    Hello,

    I did attempt the kata and all not random tests pass but all the random fail. "Max Buffer Size Reached (1.5 MiB)" Any idea why that could be? Thanks!

    Time: 1336msPassed: 5 Failed: 85 Exit Code: 137
    Test Results:
    Example tests
    Empty file list
    Singleton file list
    Dobbleton file list
    Files last
    Example from description
    Completed in 0.22ms
    Random tests
    Random test - 50 files (0 of 30 Assertions)
    Random test - 100 files (0 of 30 Assertions)
    Random test - 500 files (0 of 20 Assertions)
    Random test - 2000 files (0 of 5 Assertions)
    STDERR
    Max Buffer Size Reached (1.5 MiB)

  • Default User Avatar

    Hello,

    could someone please approve my translation https://www.codewars.com/kumite/5fe34a61262ca6002bcd923c

    thanks!