# Path: dataproperty/_container.py
# class MinMaxContainer(AbstractContainer):
#     __slots__ = ("__min_value", "__max_value")
# 
#     @property
#     def min_value(self):
#         return self.__min_value
# 
#     @property
#     def max_value(self):
#         return self.__max_value
# 
#     def __init__(self, value_list=None):
#         self.__min_value = None
#         self.__max_value = None
# 
#         if value_list is None:
#             return
# 
#         for value in value_list:
#             self.update(value)
# 
#     def __eq__(self, other):
#         return all([self.min_value == other.min_value, self.max_value == other.max_value])
# 
#     def __ne__(self, other):
#         return any([self.min_value != other.min_value, self.max_value != other.max_value])
# 
#     def __contains__(self, x):
#         return self.min_value <= x <= self.max_value
# 
#     def diff(self):
#         try:
#             return self.max_value - self.min_value
#         except TypeError:
#             return float("nan")
# 
#     def mean(self):
#         try:
#             return (self.max_value + self.min_value) * 0.5
#         except TypeError:
#             return float("nan")
# 
#     def update(self, value):
#         if value is None:
#             return
# 
#         if self.__min_value is None:
#             self.__min_value = value
#         else:
#             self.__min_value = min(self.__min_value, value)
# 
#         if self.__max_value is None:
#             self.__max_value = value
#         else:
#             self.__max_value = max(self.__max_value, value)
# 
#     def merge(self, value):
#         self.update(value.min_value)
#         self.update(value.max_value)


import sys
import pytest
from typepy import Nan
from dataproperty import MinMaxContainer
"""





@pytest.fixture
def container():
    return MinMaxContainer()


class Test_MinMaxContainer_property:
    def test_null(self, container):
        assert container.min_value is None
        assert container.max_value is None


class Test_MinMaxContainer_repr:
    @pytest.mark.parametrize(
        ["values", "expected"],
        [[[1, 3], "min=1, max=3"], [[1], "min=1, max=1"], [[None, None], "None"]],
    )
    def test_normal(self, values, expected):
        assert str(MinMaxContainer(values)) == expected


class Test_MinMaxContainer_eq_ne:
    @pytest.mark.parametrize(
        ["lhs", "rhs", "expected"],
        [

# Path: dataproperty/_container.py
# class MinMaxContainer(AbstractContainer):
#     __slots__ = ("__min_value", "__max_value")
# 
#     @property
#     def min_value(self):
#         return self.__min_value
# 
#     @property
#     def max_value(self):
#         return self.__max_value
# 
#     def __init__(self, value_list=None):
#         self.__min_value = None
#         self.__max_value = None
# 
#         if value_list is None:
#             return
# 
#         for value in value_list:
#             self.update(value)
# 
#     def __eq__(self, other):
#         return all([self.min_value == other.min_value, self.max_value == other.max_value])
# 
#     def __ne__(self, other):
#         return any([self.min_value != other.min_value, self.max_value != other.max_value])
# 
#     def __contains__(self, x):
#         return self.min_value <= x <= self.max_value
# 
#     def diff(self):
#         try:
#             return self.max_value - self.min_value
#         except TypeError:
#             return float("nan")
# 
#     def mean(self):
#         try:
#             return (self.max_value + self.min_value) * 0.5
#         except TypeError:
#             return float("nan")
# 
#     def update(self, value):
#         if value is None:
#             return
# 
#         if self.__min_value is None:
#             self.__min_value = value
#         else:
#             self.__min_value = min(self.__min_value, value)
# 
#         if self.__max_value is None:
#             self.__max_value = value
#         else:
#             self.__max_value = max(self.__max_value, value)
# 
#     def merge(self, value):
#         self.update(value.min_value)
#         self.update(value.max_value)


# Path: test/test_container.py
import sys
import pytest
from typepy import Nan
from dataproperty import MinMaxContainer

"""





@pytest.fixture
def container():
    return MinMaxContainer()


class Test_MinMaxContainer_property:
    def test_null(self, container):
        assert container.min_value is None
        assert container.max_value is None


class Test_MinMaxContainer_repr:
    @pytest.mark.parametrize(
        ["values", "expected"],
        [[[1, 3], "min=1, max=3"], [[1], "min=1, max=1"], [[None, None], "None"]],
    )
    def test_normal(self, values, expected):
        assert str(MinMaxContainer(values)) == expected


class Test_MinMaxContainer_eq_ne:
    @pytest.mark.parametrize(
        ["lhs", "rhs", "expected"],
        [

            [MinMaxContainer([1, 3]), MinMaxContainer([1, 3]), True],