From 8c75c01558fdec24c55b18f3df5e18574ee0d185 Mon Sep 17 00:00:00 2001 From: ardunn Date: Tue, 14 May 2019 20:30:30 -0700 Subject: [PATCH] add a test to make sure instantiation is ok --- automatminer/tests/test_presets.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/automatminer/tests/test_presets.py b/automatminer/tests/test_presets.py index 9d4b1be0..a1ee6490 100644 --- a/automatminer/tests/test_presets.py +++ b/automatminer/tests/test_presets.py @@ -5,6 +5,7 @@ """ import unittest +from automatminer import MatPipe from automatminer.presets import get_preset_config AF_KEY = "autofeaturizer" @@ -19,31 +20,43 @@ def test_production(self): prod = get_preset_config("production") for k in KEYSET: self.assertTrue(k in prod.keys()) + MatPipe(**prod) def test_debug(self): debug = get_preset_config("debug") for k in KEYSET: self.assertTrue(k in debug.keys()) + MatPipe(**debug) def test_debug_single(self): debug_single = get_preset_config("debug_single") for k in KEYSET: self.assertTrue(k in debug_single.keys()) + MatPipe(**debug_single) def test_express(self): express = get_preset_config("express") for k in KEYSET: self.assertTrue(k in express.keys()) + MatPipe(**express) + + def test_express_single(self): + express_single = get_preset_config("express_single") + for k in KEYSET: + self.assertTrue(k in express_single.keys()) + MatPipe(**express_single) def test_heavy(self): heavy = get_preset_config("heavy") for k in KEYSET: self.assertTrue(k in heavy.keys()) + MatPipe(**heavy) def test_caching_powerup(self): cache_src = "./somefile.json" prod = get_preset_config("production", cache_src=cache_src) self.assertEqual(prod[AF_KEY].cache_src, cache_src) + MatPipe(**prod) def test_missing(self): with self.assertRaises(ValueError):