# Path: sigal/utils.py
# VIDEO_MIMES = {'.mp4': 'video/mp4', '.webm': 'video/webm', '.ogv': 'video/ogg'}
# MD = None
#         MD = Markdown(
#             extensions=[
#                 'markdown.extensions.extra',
#                 'markdown.extensions.meta',
#                 'markdown.extensions.tables',
#             ],
#             output_format='html5',
#         )
# class Devnull:
#     def write(self, *_):
#     def flush(self, *_):
# def copy(src, dst, symlink=False, rellink=False):
# def check_or_create_dir(path):
# def get_mod_date(path):
# def url_from_path(path):
# def read_markdown(filename):
# def is_valid_html5_video(ext):
# def get_mime(ext):


import os
from pathlib import Path
from sigal import utils


CURRENT_DIR = os.path.dirname(__file__)
SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample')


def test_copy(tmpdir):
    filename = 'KeckObservatory20071020.jpg'
    src = os.path.join(SAMPLE_DIR, 'pictures', 'dir2', filename)
    dst = str(tmpdir.join(filename))

# Path: sigal/utils.py
# VIDEO_MIMES = {'.mp4': 'video/mp4', '.webm': 'video/webm', '.ogv': 'video/ogg'}
# MD = None
#         MD = Markdown(
#             extensions=[
#                 'markdown.extensions.extra',
#                 'markdown.extensions.meta',
#                 'markdown.extensions.tables',
#             ],
#             output_format='html5',
#         )
# class Devnull:
#     def write(self, *_):
#     def flush(self, *_):
# def copy(src, dst, symlink=False, rellink=False):
# def check_or_create_dir(path):
# def get_mod_date(path):
# def url_from_path(path):
# def read_markdown(filename):
# def is_valid_html5_video(ext):
# def get_mime(ext):


# Path: tests/test_utils.py
import os
from pathlib import Path
from sigal import utils



CURRENT_DIR = os.path.dirname(__file__)
SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample')


def test_copy(tmpdir):
    filename = 'KeckObservatory20071020.jpg'
    src = os.path.join(SAMPLE_DIR, 'pictures', 'dir2', filename)
    dst = str(tmpdir.join(filename))

    utils.copy(src, dst)