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