diff --git a/setup.cfg b/setup.cfg index 7eb62624..17588b74 100644 --- a/setup.cfg +++ b/setup.cfg @@ -122,6 +122,9 @@ markers= python_files=tests_*.py tests_*.ipynb testpaths=tests addopts=-v --tb=short -rxs -W=error --durations=0 --durations-min=0.1 +[regex1] +regex: (?<= )[\s\d.]+(it/s|s/it) +replace: ??.??it/s [coverage:run] branch=True diff --git a/tests_notebook.ipynb b/tests_notebook.ipynb index 3df65474..64e0c706 100644 --- a/tests_notebook.ipynb +++ b/tests_notebook.ipynb @@ -1,12 +1,29 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This file is part of the [test suite](./tests) and will be moved there when [nbval#116](https://github.com/computationalmodelling/nbval/issues/116#issuecomment-793148404) is fixed.\n", + "\n", + "See [DEMO.ipynb](DEMO.ipynb) instead for notebook examples." + ] + }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ - "from tqdm.notebook import tqdm" + "from functools import partial\n", + "from time import sleep\n", + "\n", + "from tqdm.notebook import tqdm_notebook\n", + "from tqdm.notebook import tnrange\n", + "\n", + "# avoid displaying widgets by default (pollutes output cells)\n", + "tqdm = partial(tqdm_notebook, display=False)\n", + "trange = partial(tnrange, display=False)" ] }, { @@ -36,7 +53,189 @@ } ], "source": [ - "help(tqdm.display)" + "help(tqdm_notebook.display)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# basic use" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "7c18c038bf964b55941e228503292506", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + " 0%| | 0/10 [00:00