update model version
This commit is contained in:
21
tests/test_artifact_paths.py
Normal file
21
tests/test_artifact_paths.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from cbpred.__main__ import build_parser
|
||||
|
||||
|
||||
class ArtifactPathTests(unittest.TestCase):
|
||||
def test_cli_defaults_use_versioned_artifact_directory(self):
|
||||
parser = build_parser()
|
||||
|
||||
train = parser.parse_args(["train"])
|
||||
run = parser.parse_args(["run"])
|
||||
predict = parser.parse_args(["predict", "--csv", "data.csv"])
|
||||
|
||||
self.assertEqual(train.artifact_dir, Path("artifacts/v1"))
|
||||
self.assertEqual(run.artifact_dir, Path("artifacts/v1"))
|
||||
self.assertEqual(predict.artifact, Path("artifacts/v1/model.joblib"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user