# Path: simplemonitor/Monitors/host.py
#     WIN32_AVAILABLE = True
#     WIN32_AVAILABLE = False
# class MonitorDiskSpace(Monitor):
# class MonitorFileStat(Monitor):
# class MonitorApcupsd(Monitor):
# class MonitorPortAudit(Monitor):
# class MonitorPkgAudit(Monitor):
# class MonitorLoadAvg(Monitor):
# class MonitorMemory(Monitor):
# class MonitorSwap(Monitor):
# class MonitorZap(Monitor):
# class MonitorCommand(Monitor):
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:
#     def run_test(self) -> bool:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:
#     def run_test(self) -> bool:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def describe(self) -> str:
#     def run_test(self) -> bool:
#     def get_params(self) -> Tuple:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def get_params(self) -> Tuple:
#     def describe(self) -> str:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def get_params(self) -> Tuple:
#     def describe(self) -> str:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:


import unittest
from simplemonitor.Monitors import host
    def test_DiskSpace_brokenConfigThree(self):
        config_options = {"partition": "/", "limit": "moo"}
        with self.assertRaises(ValueError):
            host.MonitorDiskSpace("test", config_options)

    def test_DiskSpace_correctConfig(self):
        m = host.MonitorDiskSpace("test", self.safe_config)
        self.assertIsInstance(m, host.MonitorDiskSpace)

    def test_DiskSpace_meta(self):
        m = host.MonitorDiskSpace("test", self.safe_config)

        self.assertEqual(
            m.describe(),
            "Checking for at least 10.00GiB free space on /",
            "Failed to verify description",
        )

        self.assertTupleEqual(
            m.get_params(), (10 * self.one_GB, "/"), "Failed to verify params"
        )

    def test_DiskSpace_free(self):
        # Hopefully our test machine has at least 1 byte free on /
        config_options = {"partition": "/", "limit": "1"}
        m = host.MonitorDiskSpace("test", config_options)
        m.run_test()
        self.assertTrue(m.test_success())

        # and hopefully it has a sensible-sized root partition

# Path: simplemonitor/Monitors/host.py
#     WIN32_AVAILABLE = True
#     WIN32_AVAILABLE = False
# class MonitorDiskSpace(Monitor):
# class MonitorFileStat(Monitor):
# class MonitorApcupsd(Monitor):
# class MonitorPortAudit(Monitor):
# class MonitorPkgAudit(Monitor):
# class MonitorLoadAvg(Monitor):
# class MonitorMemory(Monitor):
# class MonitorSwap(Monitor):
# class MonitorZap(Monitor):
# class MonitorCommand(Monitor):
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:
#     def run_test(self) -> bool:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:
#     def run_test(self) -> bool:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def describe(self) -> str:
#     def run_test(self) -> bool:
#     def get_params(self) -> Tuple:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def get_params(self) -> Tuple:
#     def describe(self) -> str:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def get_params(self) -> Tuple:
#     def describe(self) -> str:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:
#     def __init__(self, name: str, config_options: dict) -> None:
#     def run_test(self) -> bool:
#     def describe(self) -> str:
#     def get_params(self) -> Tuple:


# Path: tests/test_host.py
import unittest
from simplemonitor.Monitors import host

    def test_DiskSpace_brokenConfigThree(self):
        config_options = {"partition": "/", "limit": "moo"}
        with self.assertRaises(ValueError):
            host.MonitorDiskSpace("test", config_options)

    def test_DiskSpace_correctConfig(self):
        m = host.MonitorDiskSpace("test", self.safe_config)
        self.assertIsInstance(m, host.MonitorDiskSpace)

    def test_DiskSpace_meta(self):
        m = host.MonitorDiskSpace("test", self.safe_config)

        self.assertEqual(
            m.describe(),
            "Checking for at least 10.00GiB free space on /",
            "Failed to verify description",
        )

        self.assertTupleEqual(
            m.get_params(), (10 * self.one_GB, "/"), "Failed to verify params"
        )

    def test_DiskSpace_free(self):
        # Hopefully our test machine has at least 1 byte free on /
        config_options = {"partition": "/", "limit": "1"}
        m = host.MonitorDiskSpace("test", config_options)
        m.run_test()
        self.assertTrue(m.test_success())

        # and hopefully it has a sensible-sized root partition

        config_options = {"partition": "/", "limit": "100000G"}