Spaces:
Sleeping
Sleeping
Download dataset/problem_5/test.py from Viraj0112/rl_code_fix_env: direct link, hf CLI and curl.
- Browser
- Download file 392 Bytes
-
https://huggingface.co/spaces/Viraj0112/rl_code_fix_env/resolve/main/dataset/problem_5/test.py
- Command line
-
hf download hf://spaces/Viraj0112/rl_code_fix_env/dataset/problem_5/test.py
-
curl -L -o test.py https://huggingface.co/spaces/Viraj0112/rl_code_fix_env/resolve/main/dataset/problem_5/test.py
392 Bytes
| import unittest | |
| from dataset.problem_5.buggy import chunk_list | |
| class TestChunkList(unittest.TestCase): | |
| def test_even_chunks(self): | |
| self.assertEqual(chunk_list([1, 2, 3, 4], 2), [[1, 2], [3, 4]]) | |
| def test_partial_tail_chunk(self): | |
| self.assertEqual(chunk_list([1, 2, 3, 4, 5], 2), [[1, 2], [3, 4], [5]]) | |
| if __name__ == "__main__": | |
| unittest.main() | |