# Path: xpaw/decorator.py
# def every(hours=None, minutes=None, seconds=None):
#     def wrapper(func):
#         func.cron_job = True
#         func.cron_tick = hours * 3600 + minutes * 60 + seconds
#         return func
# 
#     if hours is None and minutes is None and seconds is None:
#         raise ValueError('At least one of the parameters (hours, minutes and seconds) is not none')
#     if hours is None:
#         hours = 0
#     if minutes is None:
#         minutes = 0
#     if seconds is None:
#         seconds = 0
#     return wrapper


import pytest
from xpaw.decorator import every
# coding=utf-8




def test_every_value_error():
    with pytest.raises(ValueError):
        @every()
        def func():
            pass


def test_every():
    @every(hours=1)
    def func_hours():
        pass

    assert func_hours.cron_job is True and func_hours.cron_tick == 3600


# Path: xpaw/decorator.py
# def every(hours=None, minutes=None, seconds=None):
#     def wrapper(func):
#         func.cron_job = True
#         func.cron_tick = hours * 3600 + minutes * 60 + seconds
#         return func
# 
#     if hours is None and minutes is None and seconds is None:
#         raise ValueError('At least one of the parameters (hours, minutes and seconds) is not none')
#     if hours is None:
#         hours = 0
#     if minutes is None:
#         minutes = 0
#     if seconds is None:
#         seconds = 0
#     return wrapper


# Path: tests/test_decorator.py
import pytest
from xpaw.decorator import every

# coding=utf-8




def test_every_value_error():
    with pytest.raises(ValueError):
        @every()
        def func():
            pass


def test_every():
    @every(hours=1)
    def func_hours():
        pass

    assert func_hours.cron_job is True and func_hours.cron_tick == 3600


    @every(minutes=1)