def save_client_config(self, filepath): """ Save current client config to a file :param filepath: path to file """ write(filepath, self, Ebonite)
def test_metric__callable_works(tmpdir): from metric import my_custom_metric metric: CallableMetric = MetricAnalyzer.analyze(my_custom_metric) write(os.path.join(tmpdir, 'metric.json'), metric) shutil.copy(fs.current_module_path('use_metric.py'), tmpdir) cp = subprocess.run('python use_metric.py', shell=True, cwd=tmpdir) assert cp.returncode == 0, cp.stderr