import CoreMotion
from PyObjCTools.TestSupport import TestCase, min_os_level

CMPedometerHandler = b"v@"
CMPedometerEventHandler = b"v@@"


class TestCMPedometer(TestCase):
    def test_enum_types(self):
        self.assertIsEnumType(CoreMotion.CMPedometerEventType)

    def test_constants(self):
        self.assertEqual(CoreMotion.CMPedometerEventTypePause, 0)
        self.assertEqual(CoreMotion.CMPedometerEventTypeResume, 1)

    @min_os_level("10.15")
    def test_methods10_15(self):
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isStepCountingAvailable)
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isDistanceAvailable)
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isFloorCountingAvailable)
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isPaceAvailable)

        self.assertArgIsBlock(
            CoreMotion.CMPedometer.queryPedometerDataFromDate_toDate_withHandler_,
            2,
            CMPedometerHandler,
        )
        self.assertArgIsBlock(
            CoreMotion.CMPedometer.startPedometerUpdatesFromDate_withHandler_,
            1,
            CMPedometerHandler,
        )
        self.assertArgIsBlock(
            CoreMotion.CMPedometer.startPedometerEventUpdatesWithHandler_,
            0,
            CMPedometerEventHandler,
        )

8e96ad02073f861a8901d2853fb99577504cebba
<mask token>


class TestCMPedometer(TestCase):

    def test_enum_types(self):
        self.assertIsEnumType(CoreMotion.CMPedometerEventType)
    <mask token>
    <mask token>

<mask token>


class TestCMPedometer(TestCase):

    def test_enum_types(self):
        self.assertIsEnumType(CoreMotion.CMPedometerEventType)

    def test_constants(self):
        self.assertEqual(CoreMotion.CMPedometerEventTypePause, 0)
        self.assertEqual(CoreMotion.CMPedometerEventTypeResume, 1)

    @min_os_level('10.15')
    def test_methods10_15(self):
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isStepCountingAvailable)
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isDistanceAvailable)
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isFloorCountingAvailable
            )
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isPaceAvailable)
        self.assertArgIsBlock(CoreMotion.CMPedometer.
            queryPedometerDataFromDate_toDate_withHandler_, 2,
            CMPedometerHandler)
        self.assertArgIsBlock(CoreMotion.CMPedometer.
            startPedometerUpdatesFromDate_withHandler_, 1, CMPedometerHandler)
        self.assertArgIsBlock(CoreMotion.CMPedometer.
            startPedometerEventUpdatesWithHandler_, 0, CMPedometerEventHandler)

<mask token>
CMPedometerHandler = b'v@'
CMPedometerEventHandler = b'v@@'


class TestCMPedometer(TestCase):

    def test_enum_types(self):
        self.assertIsEnumType(CoreMotion.CMPedometerEventType)

    def test_constants(self):
        self.assertEqual(CoreMotion.CMPedometerEventTypePause, 0)
        self.assertEqual(CoreMotion.CMPedometerEventTypeResume, 1)

    @min_os_level('10.15')
    def test_methods10_15(self):
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isStepCountingAvailable)
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isDistanceAvailable)
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isFloorCountingAvailable
            )
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isPaceAvailable)
        self.assertArgIsBlock(CoreMotion.CMPedometer.
            queryPedometerDataFromDate_toDate_withHandler_, 2,
            CMPedometerHandler)
        self.assertArgIsBlock(CoreMotion.CMPedometer.
            startPedometerUpdatesFromDate_withHandler_, 1, CMPedometerHandler)
        self.assertArgIsBlock(CoreMotion.CMPedometer.
            startPedometerEventUpdatesWithHandler_, 0, CMPedometerEventHandler)

import CoreMotion
from PyObjCTools.TestSupport import TestCase, min_os_level
CMPedometerHandler = b'v@'
CMPedometerEventHandler = b'v@@'


class TestCMPedometer(TestCase):

    def test_enum_types(self):
        self.assertIsEnumType(CoreMotion.CMPedometerEventType)

    def test_constants(self):
        self.assertEqual(CoreMotion.CMPedometerEventTypePause, 0)
        self.assertEqual(CoreMotion.CMPedometerEventTypeResume, 1)

    @min_os_level('10.15')
    def test_methods10_15(self):
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isStepCountingAvailable)
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isDistanceAvailable)
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isFloorCountingAvailable
            )
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isPaceAvailable)
        self.assertArgIsBlock(CoreMotion.CMPedometer.
            queryPedometerDataFromDate_toDate_withHandler_, 2,
            CMPedometerHandler)
        self.assertArgIsBlock(CoreMotion.CMPedometer.
            startPedometerUpdatesFromDate_withHandler_, 1, CMPedometerHandler)
        self.assertArgIsBlock(CoreMotion.CMPedometer.
            startPedometerEventUpdatesWithHandler_, 0, CMPedometerEventHandler)

import CoreMotion
from PyObjCTools.TestSupport import TestCase, min_os_level

CMPedometerHandler = b"v@"
CMPedometerEventHandler = b"v@@"


class TestCMPedometer(TestCase):
    def test_enum_types(self):
        self.assertIsEnumType(CoreMotion.CMPedometerEventType)

    def test_constants(self):
        self.assertEqual(CoreMotion.CMPedometerEventTypePause, 0)
        self.assertEqual(CoreMotion.CMPedometerEventTypeResume, 1)

    @min_os_level("10.15")
    def test_methods10_15(self):
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isStepCountingAvailable)
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isDistanceAvailable)
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isFloorCountingAvailable)
        self.assertResultIsBOOL(CoreMotion.CMPedometer.isPaceAvailable)

        self.assertArgIsBlock(
            CoreMotion.CMPedometer.queryPedometerDataFromDate_toDate_withHandler_,
            2,
            CMPedometerHandler,
        )
        self.assertArgIsBlock(
            CoreMotion.CMPedometer.startPedometerUpdatesFromDate_withHandler_,
            1,
            CMPedometerHandler,
        )
        self.assertArgIsBlock(
            CoreMotion.CMPedometer.startPedometerEventUpdatesWithHandler_,
            0,
            CMPedometerEventHandler,
        )
