This commit is contained in:
miguelgfierro 2019-04-16 19:57:14 +01:00
Родитель 2effbfcfcb
Коммит fcd6eef796
2 изменённых файлов: 37 добавлений и 0 удалений

20
tests/conftest.py Normal file
Просмотреть файл

@ -0,0 +1,20 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# NOTE: This file is used by pytest to inject fixtures automatically. As it is explained in the documentation
# https://docs.pytest.org/en/latest/fixture.html:
# "If during implementing your tests you realize that you want to use a fixture function from multiple test files
# you can move it to a conftest.py file. You dont need to import the fixture you want to use in a test, it
# automatically gets discovered by pytest."
import pytest
from tests.notebooks_common import path_notebooks
@pytest.fixture(scope="module")
def notebooks():
folder_notebooks = path_notebooks()
# Path for the notebooks
paths = {}
return paths

17
tests/notebooks_common.py Normal file
Просмотреть файл

@ -0,0 +1,17 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import os
# Unless manually modified, python3 should be the name of the current jupyter kernel
# that runs on the activated conda environment
KERNEL_NAME = "python3"
OUTPUT_NOTEBOOK = "output.ipynb"
def path_notebooks():
"""Returns the path of the notebooks folder"""
return os.path.abspath(
os.path.join(os.path.dirname(__file__), os.path.pardir, "examples")
)