Coverage for tests/test_use.py: 100%

1 import pytest

2 import mall

3 import polars

4

5

6 def test_use_init():

7 data = mall.MallData

8 reviews = data.reviews

9 x = reviews.llm.use()

10 x == dict(backend="ollama", model="llama3.2", _cache="_mall_cache")

11

12

13 def test_use_mod1():

14 data = mall.MallData

15 reviews = data.reviews

16 x = reviews.llm.use(options=dict(seed=100))

17 x == dict(

18 backend="ollama", model="llama3.2", _cache="_mall_cache", options=dict(seed=100)

19 )

20

21

22 def test_use_mod2():

23 data = mall.MallData

24 reviews = data.reviews

25 x = reviews.llm.use(options=dict(seed=99))

26 x == dict(

27 backend="ollama", model="llama3.2", _cache="_mall_cache", options=dict(seed=99)

28 )