pass storage when copy/deepcopy a config

This commit is contained in:
Emmanuel Garette 2018-09-12 16:45:20 +02:00
parent 8093a29a12
commit 4d3a470e58
1 changed files with 8 additions and 5 deletions

View File

@ -16,7 +16,6 @@
# ____________________________________________________________
from inspect import ismethod, getdoc, signature
from time import time
from copy import deepcopy
from typing import List, Any, Optional, Callable, Union, Dict
@ -979,12 +978,16 @@ class TiramisuContextConfig(TiramisuContext):
return self.config_bag.context.impl_getname()
def _c_copy(self,
session_id=None):
return Config(self.config_bag.context.duplicate(session_id))
session_id=None,
storage=None):
return Config(self.config_bag.context.duplicate(session_id,
storage=storage))
def _c_deepcopy(self,
session_id=None):
session_id=None,
storage=None):
return Config(self.config_bag.context.duplicate(session_id,
storage=storage,
deep=True))
def _c_meta(self):
@ -1146,7 +1149,7 @@ class GroupConfig(TiramisuAPI):
super().__init__(config)
def getapi(config: Config):
def getapi(config: Config): # pragma: no cover
"""instanciate Config
:param config: KernelConfig object