tests init
This commit is contained in:
Родитель
2effbfcfcb
Коммит
fcd6eef796
|
@ -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 don’t 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
|
|
@ -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")
|
||||
)
|
||||
|
Загрузка…
Ссылка в новой задаче