# Path: nuka/tasks/yum.py
# class update(Task):
# class install(Task):
#     def __init__(self, cache=None, **kwargs):
#     def do(self):
#     def __init__(self, packages=None, update_cache=None, **kwargs):
#     def pkg_list(self, packages):
#     def do(self):
#     def diff(self):


from nuka.tasks import yum
import pytest
import os
# -*- coding: utf-8 -*-

pytestmark = [
    pytest.mark.skipif(
        'centos' not in os.environ['ENV_NAME'], reason='centos only'),
]


@pytest.mark.asyncio
async def test_update_doc(host):
    res = await yum.update(cache=3600)
    assert bool(res)


@pytest.mark.asyncio
async def test_install_doc(host):
    res = await yum.install(['python'])
    assert bool(res)


@pytest.mark.asyncio
async def test_install_diff(host, diff_mode):
    with diff_mode:

# Path: nuka/tasks/yum.py
# class update(Task):
# class install(Task):
#     def __init__(self, cache=None, **kwargs):
#     def do(self):
#     def __init__(self, packages=None, update_cache=None, **kwargs):
#     def pkg_list(self, packages):
#     def do(self):
#     def diff(self):


# Path: tests/tasks/test_yum.py
from nuka.tasks import yum
import pytest
import os

# -*- coding: utf-8 -*-

pytestmark = [
    pytest.mark.skipif(
        'centos' not in os.environ['ENV_NAME'], reason='centos only'),
]


@pytest.mark.asyncio
async def test_update_doc(host):
    res = await yum.update(cache=3600)
    assert bool(res)


@pytest.mark.asyncio
async def test_install_doc(host):
    res = await yum.install(['python'])
    assert bool(res)


@pytest.mark.asyncio
async def test_install_diff(host, diff_mode):
    with diff_mode:

        res = await yum.install(packages=['moreutils'])