That's because your IDE does not have all the tests that are run by the testing suite for this kata on Codewars.
You will have to rely on the tests here on site. If you wish you, can print the input and observe the expected output for any one test. Then you could add that test to what you're using off-site. Personally, I think it's easiest to just stay on Codewars to complete these tasks for this reason.
Thank you KayleightWasTaken! You we pointing me about this issue of test cases in a different kata but I forgot to change it here :/ . I will go around my other katas shortly and modify it and make sure not to do this mistake again!
So what happens with the functions that generate structures. I have one for generating bad structures generate_bad_structure which should ideally test for False cases and generate_nested which generate True case structures and 50% chance to select one of them. generate_bad_structure generates random nested arrays and usually they are False structures but I also noticed that ocasionally it does create some true structures ( usually, when the structure is small like [ [],[],[] ]). I think, they should be fine but, if not, please let me know.
Somewhat refactored the tests here. Didn't touch the test generation code itself though, not currently awake enough to try to parse what exactly it's trying to achieve, though generate_bad_structure seems to generate True cases sometimes, and the inverse for generate_nested?
Dunno if I solved it "correctly". xD
_
was is all that long?
less than one third of a day
that is not too bad
That's because your IDE does not have all the tests that are run by the testing suite for this kata on Codewars.
You will have to rely on the tests here on site. If you wish you, can print the input and observe the expected output for any one test. Then you could add that test to what you're using off-site. Personally, I think it's easiest to just stay on Codewars to complete these tasks for this reason.
C Fork
addresses this and other testing concerns
approved, thank you
Lua translation!
😬
wat
Thank you KayleightWasTaken! You we pointing me about this issue of test cases in a different kata but I forgot to change it here :/ . I will go around my other katas shortly and modify it and make sure not to do this mistake again!
So what happens with the functions that generate structures. I have one for generating bad structures
generate_bad_structure
which should ideally test forFalse
cases andgenerate_nested
which generateTrue
case structures and 50% chance to select one of them.generate_bad_structure
generates random nested arrays and usually they are False structures but I also noticed that ocasionally it does create some true structures ( usually, when the structure is small like [ [],[],[] ]). I think, they should be fine but, if not, please let me know.Hi! Yes, you are definitely right about antipattern. Just have approved the proposed translation by KayleighWasTaken which tackles the problem
Somewhat refactored the tests here. Didn't touch the test generation code itself though, not currently awake enough to try to parse what exactly it's trying to achieve, though
generate_bad_structure
seems to generateTrue
cases sometimes, and the inverse forgenerate_nested
?I'll have a go at cleaning up the tests a little and adding assertion messages etc then.
This comment is hidden because it contains spoiler information about the solution
clean kata
Loading more items...