Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek committed Feb 26, 2024
1 parent 1f8cc5e commit 5fbdfdb
Show file tree
Hide file tree
Showing 4 changed files with 466 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,19 @@ podman run -p 8888:8888 quay.io/opendatahub/workbench-images:jupyter-minimal-ubi

## Testing Notebooks

## Pytest in PyCharm

* https://youtrack.jetbrains.com/issue/PY-16316/Test-Runner-unify-showing-of-the-subtests-and-yielded-tests-of-nose-and-py.test#focus=Comments-27-2718487.0-0
*

```shell
pip install hatch
hatch config set dirs.env.virtual .venv
hatch env create

hatch run pytest
```

Deploy the notebook images in your Kubernetes environment using deploy8-${NOTEBOOK_NAME} for ubi8 or deploy9-${NOTEBOOK_NAME} for ubi9:

```shell
Expand Down
40 changes: 40 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "notebooks-tests"
version = "0.0.0"
description = "Test suite for Open Data Hub / OpenShift AI Notebook / Workbench images, written in Python."
requires-python = ">=3.11"
keywords = [
"testing", "packaging"
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Testing",
"Topic :: Software Development :: Libraries",
]
readme = "README.md"

dependencies = [
"pytest",
]

[project.urls]
Repository = "https://github.com/opendatahub-io/notebooks"
Documentation = "https://github.com/opendatahub-io/opendatahub-documentation"

[tool.hatch]
[tool.hatch.build.targets.wheel]
packages = ["tests"]

15 changes: 15 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# https://docs.pytest.org/en/7.1.x/reference/reference.html#configuration-options

[pytest]
addopts = --strict-markers --capture=no --tb=short

junit_logging = all
junit_log_passing_tests = False

log_cli = True
log_cli_date_format = %Y-%m-%d %H:%M:%S
log_cli_format = %(asctime)s %(levelname)s %(message)s
log_cli_level = INFO

log_file = logs/pytest-logs.txt
log_file_level = DEBUG
Loading

0 comments on commit 5fbdfdb

Please sign in to comment.