https://github.com/Unidata/metpy
Raw File
Tip revision: 02084cc86bebd6a85f8c2dae493463421fc7563b authored by Ryan May on 01 July 2022, 03:39:51 UTC
Merge pull request #2573 from Unidata/backport-pr-2531
Tip revision: 02084cc
test_cbook.py
# Copyright (c) 2018 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Test functionality of MetPy's utility code."""

from metpy.cbook import Registry


def test_registry():
    """Test that the registry properly registers things."""
    reg = Registry()

    a = 'foo'
    reg.register('mine')(a)

    assert reg['mine'] is a
back to top