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