Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for minimal notebooks #190

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions jupyter/minimal/ubi8-python-3.8/test/test_notebook.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import unittest\n",
"import jupyterlab as jp\n",
"from platform import python_version\n",
"import nbdime\n",
"import nbgitpuller\n",
"\n",
"def get_major_minor(s):\n",
" return '.'.join(s.split('.')[:2])\n",
"\n",
"class TestPythonVersion(unittest.TestCase):\n",
" def test_version(self):\n",
" expected_major_minor = '3.8'\n",
" actual_major_minor = get_major_minor(python_version())\n",
" self.assertEqual(actual_major_minor, expected_major_minor, \"incorrect version\")\n",
"\n",
"class TestDependenciesVersions(unittest.TestCase):\n",
" def test_jupyter_version(self):\n",
" expected_major_minor = '3.5'\n",
" actual_major_minor = get_major_minor(jp.__version__)\n",
" self.assertEqual(actual_major_minor, expected_major_minor, \"incorrect version\")\n",
"\n",
" def test_nbgitpuller_version(self):\n",
" expected_major_minor = '1.1'\n",
" actual_major_minor = get_major_minor(nbgitpuller.__version__)\n",
" self.assertEqual(actual_major_minor, expected_major_minor, \"incorrect version\")\n",
"\n",
" def test_nbdime_version(self):\n",
" expected_major_minor = '3.1'\n",
" actual_major_minor = get_major_minor(nbdime.__version__)\n",
" self.assertEqual(actual_major_minor, expected_major_minor, \"incorrect version\")\n",
"\n",
"unittest.main(argv=[''], verbosity=2, exit=False)"
]
}
],
"metadata": {
"language_info": {
"name": "python"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
53 changes: 53 additions & 0 deletions jupyter/minimal/ubi9-python-3.9/test/test_notebook.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "2d972b6b-1211-4c21-a7e8-a1683b72a62c",
"metadata": {},
"outputs": [],
"source": [
"import unittest\n",
"import jupyterlab as jp\n",
"from platform import python_version\n",
"import nbdime\n",
"import nbgitpuller\n",
"\n",
"def get_major_minor(s):\n",
" return '.'.join(s.split('.')[:2])\n",
"\n",
"class TestPythonVersion(unittest.TestCase):\n",
" def test_version(self):\n",
" expected_major_minor = '3.9'\n",
" actual_major_minor = get_major_minor(python_version())\n",
" self.assertEqual(actual_major_minor, expected_major_minor, \"incorrect version\")\n",
"\n",
"class TestDependenciesVersions(unittest.TestCase):\n",
" def test_jupyter_version(self):\n",
" expected_major_minor = '3.5'\n",
" actual_major_minor = get_major_minor(jp.__version__)\n",
" self.assertEqual(actual_major_minor, expected_major_minor, \"incorrect version\")\n",
"\n",
" def test_nbgitpuller_version(self):\n",
" expected_major_minor = '1.1'\n",
" actual_major_minor = get_major_minor(nbgitpuller.__version__)\n",
" self.assertEqual(actual_major_minor, expected_major_minor, \"incorrect version\")\n",
"\n",
" def test_nbdime_version(self):\n",
" expected_major_minor = '3.1'\n",
" actual_major_minor = get_major_minor(nbdime.__version__)\n",
" self.assertEqual(actual_major_minor, expected_major_minor, \"incorrect version\")\n",
"\n",
"unittest.main(argv=[''], verbosity=2, exit=False)"
]
}
],
"metadata": {
"language_info": {
"name": "python"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}