mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-25 17:10:51 +00:00
test: Add deterministic test for ZebraDataset generation
This commit is contained in:
parent
c8fcb6ca02
commit
d0760926d0
1 changed files with 10 additions and 1 deletions
|
|
@ -3,9 +3,18 @@ import pytest
|
|||
from reasoning_gym.logic.zebra_puzzles import ZebraConfig, ZebraDataset
|
||||
|
||||
|
||||
def test_zebra_deterministic():
|
||||
"""Test that dataset generates same items with same seed"""
|
||||
config = ZebraConfig(seed=42, size=10, num_people=4, num_characteristics=4)
|
||||
dataset1 = ZebraDataset(config)
|
||||
dataset2 = ZebraDataset(config)
|
||||
|
||||
for i in range(len(dataset1)):
|
||||
assert dataset1[i] == dataset2[i]
|
||||
|
||||
|
||||
def test_zebra_puzzles():
|
||||
"""Test basic properties and solution of generated items"""
|
||||
|
||||
config = ZebraConfig(seed=42, size=10, num_people=4, num_characteristics=4)
|
||||
dataset = ZebraDataset(config)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue