Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
polakowo
GitHub Repository: polakowo/vectorbt
Path: blob/master/tests/test_settings.py
1071 views
1
import vectorbt as vbt
2
3
4
# ############# Global ############# #
5
6
def teardown_module():
7
vbt.settings.reset()
8
9
10
# ############# settings.py ############# #
11
12
class TestSettings:
13
def test_save_and_load(self, tmp_path):
14
vbt.settings.set_theme('seaborn')
15
vbt.settings.save(tmp_path / "settings")
16
new_settings = vbt.settings.load(tmp_path / "settings")
17
assert vbt.settings == new_settings
18
assert vbt.settings.__dict__ == new_settings.__dict__
19
20