Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added set_data_path, and updated get_filepath to use static variable * Added tests for set_data_path * Linted * Added config class and updated PrimitiveBase.get_filepath to use config * rename config class * made config importable from featuretools. config module now called config_init * Update test_feature_base.py * use primitives instead of features in set_data_path test
- Loading branch information
1 parent
56b6f91
commit de2ff0e
Showing
7 changed files
with
94 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from featuretools import config | ||
|
||
|
||
def test_get_default_config_does_not_change(): | ||
old_config = config.get_all() | ||
|
||
key = "primitive_data_folder" | ||
value = "This is an example string" | ||
config.set({key: value}) | ||
config.set_to_default() | ||
|
||
assert config.get(key) != value | ||
|
||
config.set(old_config) | ||
|
||
|
||
def test_set_and_get_config(): | ||
|
||
key = "primitive_data_folder" | ||
old_value = config.get(key) | ||
value = "This is an example string" | ||
|
||
config.set({key: value}) | ||
assert config.get(key) == value | ||
|
||
config.set({key: old_value}) | ||
|
||
|
||
def test_get_all(): | ||
assert config.get_all() == config._data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters