def test_get_logger(name): """ Make sure get_logger gives the correct logger. """ default_logger = logging.getLogger(name) vm_logger = get_logger(name) assert vm_logger.logger is default_logger
# you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from collections import defaultdict, namedtuple import numpy as np from vermouth.parser_utils import SectionLineParser from vermouth.log_helpers import StyleAdapter, get_logger LOGGER = StyleAdapter(get_logger(__name__)) PersistenceSpecs = namedtuple("persistence", ["model", "lp", "start", "stop", "mol_idxs"]) class BuildDirector(SectionLineParser): """ Parser for the build file which dictates additional information about how to generate the system in the random-walk. """ COMMENT_CHAR = ';' def __init__(self, molecules, topology): super().__init__() self.topology = topology