🌐 AI搜索 & 代理 主页
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use unittest as the test running harness
  • Loading branch information
Montana Low committed Apr 12, 2022
commit f18f276be63af5fef7601c2fb3c8e908f65815fc
31 changes: 17 additions & 14 deletions pgml/tests/test_train.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import unittest
from pgml.train import train


Expand All @@ -14,18 +15,20 @@ def fetch(self, n):
return self._values


def test_train():
it = PlPyIterator(
[
{
"value": 5,
"weight": 5,
},
{
"value": 34,
"weight": 5,
},
]
)
class TestTrain(unittest.TestCase):
def test_train(self):
it = PlPyIterator(
[
{
"value": 5,
"weight": 5,
},
{
"value": 34,
"weight": 5,
},
]
)

train(it, y_column="weight", name="test", save=False)
train(it, y_column="weight", name="test", save=False)
self.assertTrue(True)