# -*- coding: utf-8 -*-
"""
Tests for sleep functions/classes.
"""

__author__ = '<NAME>'
__copyright__ = 'Copyright (C) 2018, Nokia'
__email__ = '<EMAIL>'

import time

from moler.util.moler_test import MolerTest


def test_sleep_for_threaded_variant():
    sleep_time = 1
    start_time = time.time()

    MolerTest.sleep(sleep_time)

    stop_time = time.time()
    elapsed = stop_time - start_time

    assert round(elapsed) == sleep_time

# -*- coding: utf-8 -*-
"""
Tests for sleep functions/classes.
"""

__author__ = '<NAME>'
__copyright__ = 'Copyright (C) 2018, Nokia'
__email__ = '<EMAIL>'

import time

from moler.util.moler_test import MolerTest


def test_sleep_for_threaded_variant():
    sleep_time = 1
    start_time = time.time()

    MolerTest.sleep(sleep_time)

    stop_time = time.time()
    elapsed = stop_time - start_time

    assert round(elapsed) == sleep_time

# -*- coding: utf-8 -*- Tests for sleep functions/classes.