12 lines
437 B
Python
12 lines
437 B
Python
import tempfile
|
|
import unittest
|
|
from pathlib import Path
|
|
from lean_bench.cli import load_tasks
|
|
class Tests(unittest.TestCase):
|
|
def test_duplicate(self):
|
|
with tempfile.TemporaryDirectory() as directory:
|
|
path = Path(directory)/'data.jsonl'
|
|
path.write_text('{"id":"x","statement":"True"}\n' * 2)
|
|
with self.assertRaises(ValueError): load_tasks(path)
|
|
if __name__ == '__main__': unittest.main()
|