Repository: mwouts/jupytext (language: python)

Issue:
The CI is broken because some of the sample notebooks are not normalized
The CI fails because some of the sample notebooks have additional properties, with errors like e.g.
```
>           raise error
E           nbformat.validator.NotebookValidationError: Additional properties are not allowed ('execution_count', 'outputs' were unexpected)
E           
E           Failed validating 'additionalProperties' in raw_cell:
E           
E           On instance['cells'][0]:
E           {'cell_type': 'raw',
E            'execution_count': None,
E            'metadata': {},
E            'outputs': ['...0 outputs...'],
E            'source': '---\n'
E                      'title: "Quick test"\n'
E                      'output:\n'
E                      '  ioslides_presentation:\n'
E                      '    wid...'}

/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/nbformat/validator.py:505: NotebookValidationError
```

For more similar errors, see the [CI logs](https://github.com/mwouts/jupytext/actions/runs/3336796573/jobs/5522376200)


Discussion / hints:
Obviously this is due to the way the collection of sample notebooks was built... many notebooks from many distinct languages, collected over a long period of time. I will follow the suggestion to call `normalize`.

Fix patch:
diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml
index eee246e9b..2aafd0132 100644
--- a/.github/workflows/continuous-integration.yml
+++ b/.github/workflows/continuous-integration.yml
@@ -24,10 +24,10 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v2
-      - name: Set up Python 3.8
+      - name: Set up Python 3.9
         uses: actions/setup-python@v1
         with:
-          python-version: 3.8
+          python-version: 3.9
       - uses: pre-commit/action@v2.0.0
 
   analyse:
@@ -41,7 +41,7 @@ jobs:
         uses: actions/checkout@v2
         with:
           # We must fetch at least the immediate parents so that if this is
-          # a pull request then we can checkout the head.
+          # a pull request then we can check out the head.
           fetch-depth: 2
 
       # If this run was triggered by a pull request event, then checkout
@@ -64,7 +64,7 @@ jobs:
     if: ${{ needs.skip_duplicate.outputs.should_skip == 'false' }}
     strategy:
       matrix:
-        python-version: [ 3.6, 3.7, 3.8, 3.9, "3.10"]
+        python-version: [ 3.6, 3.7, 3.8, 3.9, "3.10", "3.11"]
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
@@ -116,7 +116,7 @@ jobs:
     strategy:
       matrix:
         os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
-        python-version: [ 3.7 ]
+        python-version: [ 3.9 ]
     runs-on: ${{ matrix.os }}
     steps:
       - name: Checkout
@@ -173,7 +173,7 @@ jobs:
       if: ${{ needs.skip_duplicate.outputs.should_skip == 'false' }}
       strategy:
         matrix:
-          python-version: [ 3.7 ]
+          python-version: [ 3.9 ]
       runs-on: ubuntu-latest
       steps:
         - name: Checkout
@@ -200,7 +200,7 @@ jobs:
     if: ${{ needs.skip_duplicate.outputs.should_skip == 'false' }}
     strategy:
       matrix:
-        python-version: [ 3.7 ]
+        python-version: [ 3.9 ]
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
@@ -224,7 +224,7 @@ jobs:
     if: ${{ needs.skip_duplicate.outputs.should_skip == 'false' }}
     strategy:
       matrix:
-        python-version: [ 3.7 ]
+        python-version: [ 3.9 ]
     runs-on: ubuntu-latest
     steps:
       - name: Checkout
@@ -254,10 +254,10 @@ jobs:
     steps:
       - name: Checkout source
         uses: actions/checkout@v2
-      - name: Set up Python 3.7
+      - name: Set up Python 3.9
         uses: actions/setup-python@v1
         with:
-          python-version: 3.7
+          python-version: 3.9
       - name: Build package
         run: |
           pip install wheel jupyter-packaging jupyterlab>=3
@@ -280,10 +280,10 @@ jobs:
     steps:
       - name: Checkout source
         uses: actions/checkout@v2
-      - name: Set up Python 3.7
+      - name: Set up Python 3.9
         uses: actions/setup-python@v1
         with:
-          python-version: 3.7
+          python-version: 3.9
       - name: Build package
         run: |
           pip install wheel jupyter-packaging jupyterlab>=3
diff --git a/codecov.yml b/codecov.yml
index c875317d4..036b7736f 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -1,5 +1,5 @@
 comment:
-  after_n_builds: 11
+  after_n_builds: 12
 
 coverage:
   status:
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index ac70a8fd2..5a563e7fc 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -1,6 +1,19 @@
 Jupytext ChangeLog
 ==================
 
+1.14.2-dev (2022-10-??)
+-------------------
+
+**Fixed**
+- The sample notebooks have been normalized with `nbformat.validator.normalize` ([#1002](https://github.com/mwouts/jupytext/issues/1002)).
+
+**Changed**
+- The CI uses Python 3.9 rather than 3.7 when testing conda environments
+
+**Added**
+- We now test Jupytext against Python 3.6 to 3.11 on the CI
+
+
 1.14.1 (2022-07-29)
 -------------------
 
diff --git a/jupytext/version.py b/jupytext/version.py
index af9e52db4..ae77350b8 100644
--- a/jupytext/version.py
+++ b/jupytext/version.py
@@ -1,3 +1,3 @@
 """Jupytext's version number"""
 
-__version__ = "1.14.1"
+__version__ = "1.14.2-dev"
diff --git a/setup.py b/setup.py
index 6786bda40..3f6c0565c 100644
--- a/setup.py
+++ b/setup.py
@@ -60,6 +60,8 @@
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
+        "Programming Language :: Python :: 3.10",
+        "Programming Language :: Python :: 3.11",
     ],
 )
 


Test patch:
diff --git a/tests/notebooks/ipynb_R/R notebook with invalid cell keys.ipynb b/tests/notebooks/ipynb_R/R notebook with invalid cell keys.ipynb
index 7bae6fc8b..c85418f34 100644
--- a/tests/notebooks/ipynb_R/R notebook with invalid cell keys.ipynb
+++ b/tests/notebooks/ipynb_R/R notebook with invalid cell keys.ipynb
@@ -25,8 +25,7 @@
       ]
      },
      "metadata": {},
-     "output_type": "display_data",
-     "source": "R display func"
+     "output_type": "display_data"
     }
    ],
    "source": [
diff --git a/tests/notebooks/ipynb_clojure/html-demo.ipynb b/tests/notebooks/ipynb_clojure/html-demo.ipynb
index 94f66c7e1..f35d59d1c 100644
--- a/tests/notebooks/ipynb_clojure/html-demo.ipynb
+++ b/tests/notebooks/ipynb_clojure/html-demo.ipynb
@@ -6,8 +6,7 @@
    "source": [
     "# Clojupyter Demo\n",
     "\n",
-    "This example notebook is from the [Clojupyter](https://github.com/clojupyter/clojupyter/blob/1637f6b2557f01db1e35bae5389bc38522eefe9a/examples/html-demo.ipynb) project.",
-    "\n",
+    "This example notebook is from the [Clojupyter](https://github.com/clojupyter/clojupyter/blob/1637f6b2557f01db1e35bae5389bc38522eefe9a/examples/html-demo.ipynb) project.\n",
     "This notebook demonstrates some of the more advanced features of Clojupyter."
    ]
   },
diff --git a/tests/notebooks/ipynb_ocaml/ocaml_notebook.ipynb b/tests/notebooks/ipynb_ocaml/ocaml_notebook.ipynb
index 4d0bdca4b..6f13f0c2c 100644
--- a/tests/notebooks/ipynb_ocaml/ocaml_notebook.ipynb
+++ b/tests/notebooks/ipynb_ocaml/ocaml_notebook.ipynb
@@ -2,57 +2,61 @@
  "cells": [
   {
    "cell_type": "markdown",
+   "id": "0ce05620",
+   "metadata": {},
    "source": [
     "# Example of an OCaml notebook"
-   ],
-   "metadata": {}
+   ]
   },
   {
    "cell_type": "code",
    "execution_count": 3,
-   "source": [
-    "let sum x y = x + y"
-   ],
+   "id": "5c62301c",
+   "metadata": {},
    "outputs": [
     {
-     "output_type": "execute_result",
      "data": {
       "text/plain": [
        "val sum : int -> int -> int = <fun>\n"
       ]
      },
+     "execution_count": 3,
      "metadata": {},
-     "execution_count": 3
+     "output_type": "execute_result"
     }
    ],
-   "metadata": {}
+   "source": [
+    "let sum x y = x + y"
+   ]
   },
   {
    "cell_type": "markdown",
+   "id": "f89c9670",
+   "metadata": {},
    "source": [
     "Let's try our function:"
-   ],
-   "metadata": {}
+   ]
   },
   {
    "cell_type": "code",
    "execution_count": 4,
-   "source": [
-    "sum 3 4 = 7 + 0"
-   ],
+   "id": "d2b696e3",
+   "metadata": {},
    "outputs": [
     {
-     "output_type": "execute_result",
      "data": {
       "text/plain": [
        "- : bool = true\n"
       ]
      },
+     "execution_count": 4,
      "metadata": {},
-     "execution_count": 4
+     "output_type": "execute_result"
     }
    ],
-   "metadata": {}
+   "source": [
+    "sum 3 4 = 7 + 0"
+   ]
   }
  ],
  "metadata": {
@@ -76,4 +80,4 @@
  },
  "nbformat": 4,
  "nbformat_minor": 5
-}
\ No newline at end of file
+}
diff --git a/tests/notebooks/ipynb_ps1/powershell.ipynb b/tests/notebooks/ipynb_ps1/powershell.ipynb
index d325faf98..206f3464e 100644
--- a/tests/notebooks/ipynb_ps1/powershell.ipynb
+++ b/tests/notebooks/ipynb_ps1/powershell.ipynb
@@ -1,5 +1,5 @@
 {
- "cells": [  
+ "cells": [
   {
    "cell_type": "markdown",
    "metadata": {},
diff --git a/tests/notebooks/ipynb_py/jupyter.ipynb b/tests/notebooks/ipynb_py/jupyter.ipynb
index 08e52ddca..d1c0106c7 100644
--- a/tests/notebooks/ipynb_py/jupyter.ipynb
+++ b/tests/notebooks/ipynb_py/jupyter.ipynb
@@ -41,7 +41,9 @@
   {
    "cell_type": "code",
    "execution_count": 2,
-   "metadata": {"scrolled":true},
+   "metadata": {
+    "scrolled": true
+   },
    "outputs": [
     {
      "data": {
diff --git a/tests/notebooks/ipynb_py/notebook_with_complex_metadata.ipynb b/tests/notebooks/ipynb_py/notebook_with_complex_metadata.ipynb
index 081e225ef..1fbaecbcc 100644
--- a/tests/notebooks/ipynb_py/notebook_with_complex_metadata.ipynb
+++ b/tests/notebooks/ipynb_py/notebook_with_complex_metadata.ipynb
@@ -27,7 +27,7 @@
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
    "version": "3.5.1"
-  }, 
+  },
   "widgets": {
    "state": {
     "a65a11f142ca44eebc913788d256adcb": {
@@ -37,7 +37,7 @@
       }
      ]
     }
-   }, 
+   },
    "version": "1.2.0"
   }
  },
diff --git a/tests/notebooks/ipynb_py/nteract_with_parameter.ipynb b/tests/notebooks/ipynb_py/nteract_with_parameter.ipynb
index aef3690d4..7ced4ed6a 100644
--- a/tests/notebooks/ipynb_py/nteract_with_parameter.ipynb
+++ b/tests/notebooks/ipynb_py/nteract_with_parameter.ipynb
@@ -1,169 +1,167 @@
 {
-  "cells": [
-    {
-      "cell_type": "code",
-      "source": [
-        "param = 4"
-      ],
-      "outputs": [],
-      "execution_count": 1,
-      "metadata": {
-        "collapsed": false,
-        "outputHidden": false,
-        "inputHidden": false,
-        "tags": [
-          "parameters"
-        ]
-      }
-    },
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "metadata": {
+    "collapsed": false,
+    "inputHidden": false,
+    "outputHidden": false,
+    "tags": [
+     "parameters"
+    ]
+   },
+   "outputs": [],
+   "source": [
+    "param = 4"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "metadata": {
+    "collapsed": false,
+    "inputHidden": false,
+    "outputHidden": false
+   },
+   "outputs": [],
+   "source": [
+    "import pandas as pd"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "metadata": {
+    "collapsed": false,
+    "inputHidden": false,
+    "outputHidden": false
+   },
+   "outputs": [
     {
-      "cell_type": "code",
-      "source": [
-        "import pandas as pd"
+     "data": {
+      "text/html": [
+       "<div>\n",
+       "<style scoped>\n",
+       "    .dataframe tbody tr th:only-of-type {\n",
+       "        vertical-align: middle;\n",
+       "    }\n",
+       "\n",
+       "    .dataframe tbody tr th {\n",
+       "        vertical-align: top;\n",
+       "    }\n",
+       "\n",
+       "    .dataframe thead th {\n",
+       "        text-align: right;\n",
+       "    }\n",
+       "</style>\n",
+       "<table border=\"1\" class=\"dataframe\">\n",
+       "  <thead>\n",
+       "    <tr style=\"text-align: right;\">\n",
+       "      <th></th>\n",
+       "      <th>A</th>\n",
+       "      <th>B</th>\n",
+       "    </tr>\n",
+       "    <tr>\n",
+       "      <th>x</th>\n",
+       "      <th></th>\n",
+       "      <th></th>\n",
+       "    </tr>\n",
+       "  </thead>\n",
+       "  <tbody>\n",
+       "    <tr>\n",
+       "      <th>x0</th>\n",
+       "      <td>1</td>\n",
+       "      <td>7</td>\n",
+       "    </tr>\n",
+       "    <tr>\n",
+       "      <th>x1</th>\n",
+       "      <td>2</td>\n",
+       "      <td>4</td>\n",
+       "    </tr>\n",
+       "  </tbody>\n",
+       "</table>\n",
+       "</div>"
       ],
-      "outputs": [],
-      "execution_count": 2,
-      "metadata": {
-        "collapsed": false,
-        "outputHidden": false,
-        "inputHidden": false
-      }
-    },
+      "text/plain": [
+       "    A  B\n",
+       "x       \n",
+       "x0  1  7\n",
+       "x1  2  4"
+      ]
+     },
+     "execution_count": 3,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n",
+    "                  index=pd.Index(['x0', 'x1'], name='x'))\n",
+    "df"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 5,
+   "metadata": {
+    "collapsed": false,
+    "inputHidden": false,
+    "outputHidden": false
+   },
+   "outputs": [
     {
-      "cell_type": "code",
-      "source": [
-        "df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},\n",
-        "                  index=pd.Index(['x0', 'x1'], name='x'))\n",
-        "df"
-      ],
-      "outputs": [
-        {
-          "output_type": "execute_result",
-          "execution_count": 3,
-          "data": {
-            "text/plain": [
-              "    A  B\n",
-              "x       \n",
-              "x0  1  7\n",
-              "x1  2  4"
-            ],
-            "text/html": [
-              "<div>\n",
-              "<style scoped>\n",
-              "    .dataframe tbody tr th:only-of-type {\n",
-              "        vertical-align: middle;\n",
-              "    }\n",
-              "\n",
-              "    .dataframe tbody tr th {\n",
-              "        vertical-align: top;\n",
-              "    }\n",
-              "\n",
-              "    .dataframe thead th {\n",
-              "        text-align: right;\n",
-              "    }\n",
-              "</style>\n",
-              "<table border=\"1\" class=\"dataframe\">\n",
-              "  <thead>\n",
-              "    <tr style=\"text-align: right;\">\n",
-              "      <th></th>\n",
-              "      <th>A</th>\n",
-              "      <th>B</th>\n",
-              "    </tr>\n",
-              "    <tr>\n",
-              "      <th>x</th>\n",
-              "      <th></th>\n",
-              "      <th></th>\n",
-              "    </tr>\n",
-              "  </thead>\n",
-              "  <tbody>\n",
-              "    <tr>\n",
-              "      <th>x0</th>\n",
-              "      <td>1</td>\n",
-              "      <td>7</td>\n",
-              "    </tr>\n",
-              "    <tr>\n",
-              "      <th>x1</th>\n",
-              "      <td>2</td>\n",
-              "      <td>4</td>\n",
-              "    </tr>\n",
-              "  </tbody>\n",
-              "</table>\n",
-              "</div>"
-            ]
-          },
-          "metadata": {}
-        }
-      ],
-      "execution_count": 3,
-      "metadata": {
-        "collapsed": false,
-        "outputHidden": false,
-        "inputHidden": false
-      }
+     "data": {
+      "text/plain": [
+       "<matplotlib.axes._subplots.AxesSubplot at 0x1634278f240>"
+      ]
+     },
+     "execution_count": 5,
+     "metadata": {},
+     "output_type": "execute_result"
     },
     {
-      "cell_type": "code",
-      "source": [
-        "%matplotlib inline\n",
-        "df.plot(kind='bar')"
-      ],
-      "outputs": [
-        {
-          "output_type": "execute_result",
-          "execution_count": 5,
-          "data": {
-            "text/plain": [
-              "<matplotlib.axes._subplots.AxesSubplot at 0x1634278f240>"
-            ]
-          },
-          "metadata": {}
-        },
-        {
-          "output_type": "display_data",
-          "data": {
-            "text/plain": [
-              "<Figure size 432x288 with 1 Axes>"
-            ],
-            "image/png": [
-              "iVBORw0KGgoAAAANSUhEUgAAAW4AAAEMCAYAAADknlzeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAADWhJREFUeJzt3V+MXHd5xvHn6XqjcYwb4s2AEMuyW6lJFBHhoCHI+VOBaSpTKpCSXmwksIqQ9gJBQEJCzl0QVKW5qEBKVWmFKRHgtYqLo4oAJpJxkEMIWRsXObEjQXDkaVJibwXGJUuS5e3FjFOznvUce8/ZM+/u9yNZ3p05Oue9OPnm+DdnZhwRAgDk8Sd1DwAAuDSEGwCSIdwAkAzhBoBkCDcAJEO4ASAZwg0AyRBuA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0AyRBuAEiGcANAMoQbAJIh3ACQDOEGgGQINwAk83+p4wopHJUYHQAAAABJRU5ErkJggg==\n"
-            ]
-          },
-          "metadata": {}
-        }
-      ],
-      "execution_count": 5,
-      "metadata": {
-        "collapsed": false,
-        "outputHidden": false,
-        "inputHidden": false
-      }
-    }
-  ],
-  "metadata": {
-    "kernel_info": {
-      "name": "python3"
-    },
-    "language_info": {
-      "name": "python",
-      "version": "3.6.6",
-      "mimetype": "text/x-python",
-      "codemirror_mode": {
-        "name": "ipython",
-        "version": 3
-      },
-      "pygments_lexer": "ipython3",
-      "nbconvert_exporter": "python",
-      "file_extension": ".py"
-    },
-    "kernelspec": {
-      "name": "python3",
-      "language": "python",
-      "display_name": "Python 3"
-    },
-    "nteract": {
-      "version": "0.11.6"
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAEMCAYAAADknlzeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAADWhJREFUeJzt3V+MXHd5xvHn6XqjcYwb4s2AEMuyW6lJFBHhoCHI+VOBaSpTKpCSXmwksIqQ9gJBQEJCzl0QVKW5qEBKVWmFKRHgtYqLo4oAJpJxkEMIWRsXObEjQXDkaVJibwXGJUuS5e3FjFOznvUce8/ZM+/u9yNZ3p05Oue9OPnm+DdnZhwRAgDk8Sd1DwAAuDSEGwCSIdwAkAzhBoBkCDcAJEO4ASAZwg0AyRBuAEiGcANAMuuq2Ok111wT4+PjVewaAFalQ4cOnY6IZpFtKwn3+Pi4Zmdnq9g1AKxKtp8rui1LJQCQDOEGgGQINwAkU8kaNwDU4ZVXXlG73db8/Hzdoyyp0WhodHRUw8PDl70Pwg1g1Wi329q4caPGx8dlu+5xLhARmpubU7vd1sTExGXvp+9Sie3rbB85788Z25+67CMCQEXm5+c1MjI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iwdI2k03XP0ddne50mWO04P0v11qIbFgl3W9Jbzvt9VNLzizeKiGlJ00UPjGJsz0ZEq+45gF44P+tRZKnkSUl/bnvC9hWSJiX9R7VjAQCW0veKOyJetf1xSfskDUn6SkQ8VflkAICeiiyVKCK+I+k7Fc+C3lh+wiDj/KyBIy54nREAMMB4yzsAJEO4ASAZwg0AyRR6cRIrx/ZVkrap8+7UUOee+X0R8etaBwOWYPuOiHik7jnWEq64B4jt7ZIOS3q3pCslbZD0HkmHus8Bg2hn3QOsNdxVMkC6HxPwrsVX17avlvRERFxbz2RY62wv9aY7S9oaERtWcp61jqWSwWL1+BwYSX9Q78+MAVbK7ZI+JOnsosetzieIYgUR7sHy95IO2/6+/v8TGcck3SHpc7VNBUg/lvS7iHh08RN8oNzKY6lkwNjeJOljkl5S52qmrc7HDbw9Ig7UOBog2zdExNOLHns35+bKItwDyPZRSV+TdL+k9ZL+UVIrIrbUOhjWvEXnZqP7N+fmCuOuksH0LnU+SvdHkn6izi2Bt9Y6EdBx/rn5pDg3a0G4B9Mr6iyVrFfnquaXEfGHekcCJHFuDgTCPZieVOc/jndKuk2dL2jeU+9IgCTOzYHAGvcAst2KiNlFj304Ir5W10yAxLk5KAg3ACTDUgkAJEO4ASAZwg0AyRBuAEiGcGPVs/1O2z+z3bC9wfZTtt9W91zA5eKuEqwJtj+vzhtG1ktqR8Q/1DwScNkIN9YE21eo8+aReUm3RMRCzSMBl42lEqwVmyS9TtJGda68gbS44saa0P0Gl92SJiS9KSI+XvNIwGXjixSw6nW/r/PViNhle0jSj2xvjYj9dc8GXA6uuAEgGda4ASAZwg0AyRBuAEiGcANAMoQbAJIh3ACQDOEGgGQINwAk83+p4wopHJUYHQAAAABJRU5ErkJggg==\n",
+      "text/plain": [
+       "<Figure size 432x288 with 1 Axes>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
     }
+   ],
+   "source": [
+    "%matplotlib inline\n",
+    "df.plot(kind='bar')"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernel_info": {
+   "name": "python3"
+  },
+  "kernelspec": {
+   "display_name": "Python 3",
+   "language": "python",
+   "name": "python3"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 3
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython3",
+   "version": "3.6.6"
   },
-  "nbformat": 4,
-  "nbformat_minor": 2
-}
\ No newline at end of file
+  "nteract": {
+   "version": "0.11.6"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/tests/notebooks/ipynb_robot/simple_robot_notebook.ipynb b/tests/notebooks/ipynb_robot/simple_robot_notebook.ipynb
index 7e9277628..61e86e4d3 100644
--- a/tests/notebooks/ipynb_robot/simple_robot_notebook.ipynb
+++ b/tests/notebooks/ipynb_robot/simple_robot_notebook.ipynb
@@ -58,10 +58,10 @@
   "pycharm": {
    "stem_cell": {
     "cell_type": "raw",
-    "source": [],
     "metadata": {
      "collapsed": false
-    }
+    },
+    "source": []
    }
   }
  },
diff --git a/tests/notebooks/ipynb_scala/simple_scala_notebook.ipynb b/tests/notebooks/ipynb_scala/simple_scala_notebook.ipynb
index f8d6a3b16..54c302687 100644
--- a/tests/notebooks/ipynb_scala/simple_scala_notebook.ipynb
+++ b/tests/notebooks/ipynb_scala/simple_scala_notebook.ipynb
@@ -13,8 +13,7 @@
       ]
      },
      "metadata": {},
-     "output_type": "display_data",
-     "source": "user"
+     "output_type": "display_data"
     },
     {
      "data": {
diff --git a/tests/notebooks/ipynb_sos/jupytext_replication.ipynb b/tests/notebooks/ipynb_sos/jupytext_replication.ipynb
index bc6f7d1a7..24f00b7d6 100644
--- a/tests/notebooks/ipynb_sos/jupytext_replication.ipynb
+++ b/tests/notebooks/ipynb_sos/jupytext_replication.ipynb
@@ -143,4 +143,4 @@
  },
  "nbformat": 4,
  "nbformat_minor": 4
-}
\ No newline at end of file
+}
diff --git a/tests/notebooks/mirror/ipynb_to_Rmd/nteract_with_parameter.Rmd b/tests/notebooks/mirror/ipynb_to_Rmd/nteract_with_parameter.Rmd
index 2c6c9758f..7639476e5 100644
--- a/tests/notebooks/mirror/ipynb_to_Rmd/nteract_with_parameter.Rmd
+++ b/tests/notebooks/mirror/ipynb_to_Rmd/nteract_with_parameter.Rmd
@@ -8,21 +8,21 @@ jupyter:
     name: python3
 ---
 
-```{python outputHidden=FALSE, inputHidden=FALSE, tags=c("parameters")}
+```{python inputHidden=FALSE, outputHidden=FALSE, tags=c("parameters")}
 param = 4
 ```
 
-```{python outputHidden=FALSE, inputHidden=FALSE}
+```{python inputHidden=FALSE, outputHidden=FALSE}
 import pandas as pd
 ```
 
-```{python outputHidden=FALSE, inputHidden=FALSE}
+```{python inputHidden=FALSE, outputHidden=FALSE}
 df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},
                   index=pd.Index(['x0', 'x1'], name='x'))
 df
 ```
 
-```{python outputHidden=FALSE, inputHidden=FALSE}
+```{python inputHidden=FALSE, outputHidden=FALSE}
 # %matplotlib inline
 df.plot(kind='bar')
 ```
diff --git a/tests/notebooks/mirror/ipynb_to_hydrogen/nteract_with_parameter.py b/tests/notebooks/mirror/ipynb_to_hydrogen/nteract_with_parameter.py
index 6f68faaf1..446c51734 100644
--- a/tests/notebooks/mirror/ipynb_to_hydrogen/nteract_with_parameter.py
+++ b/tests/notebooks/mirror/ipynb_to_hydrogen/nteract_with_parameter.py
@@ -8,17 +8,17 @@
 #     name: python3
 # ---
 
-# %% outputHidden=false inputHidden=false tags=["parameters"]
+# %% inputHidden=false outputHidden=false tags=["parameters"]
 param = 4
 
-# %% outputHidden=false inputHidden=false
+# %% inputHidden=false outputHidden=false
 import pandas as pd
 
-# %% outputHidden=false inputHidden=false
+# %% inputHidden=false outputHidden=false
 df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},
                   index=pd.Index(['x0', 'x1'], name='x'))
 df
 
-# %% outputHidden=false inputHidden=false
+# %% inputHidden=false outputHidden=false
 %matplotlib inline
 df.plot(kind='bar')
diff --git a/tests/notebooks/mirror/ipynb_to_md/nteract_with_parameter.md b/tests/notebooks/mirror/ipynb_to_md/nteract_with_parameter.md
index 3daea6dc2..daa0612fe 100644
--- a/tests/notebooks/mirror/ipynb_to_md/nteract_with_parameter.md
+++ b/tests/notebooks/mirror/ipynb_to_md/nteract_with_parameter.md
@@ -8,21 +8,21 @@ jupyter:
     name: python3
 ---
 
-```python outputHidden=false inputHidden=false tags=["parameters"]
+```python inputHidden=false outputHidden=false tags=["parameters"]
 param = 4
 ```
 
-```python outputHidden=false inputHidden=false
+```python inputHidden=false outputHidden=false
 import pandas as pd
 ```
 
-```python outputHidden=false inputHidden=false
+```python inputHidden=false outputHidden=false
 df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},
                   index=pd.Index(['x0', 'x1'], name='x'))
 df
 ```
 
-```python outputHidden=false inputHidden=false
+```python inputHidden=false outputHidden=false
 %matplotlib inline
 df.plot(kind='bar')
 ```
diff --git a/tests/notebooks/mirror/ipynb_to_percent/nteract_with_parameter.py b/tests/notebooks/mirror/ipynb_to_percent/nteract_with_parameter.py
index 80fc36a74..f986f65f6 100644
--- a/tests/notebooks/mirror/ipynb_to_percent/nteract_with_parameter.py
+++ b/tests/notebooks/mirror/ipynb_to_percent/nteract_with_parameter.py
@@ -8,17 +8,17 @@
 #     name: python3
 # ---
 
-# %% outputHidden=false inputHidden=false tags=["parameters"]
+# %% inputHidden=false outputHidden=false tags=["parameters"]
 param = 4
 
-# %% outputHidden=false inputHidden=false
+# %% inputHidden=false outputHidden=false
 import pandas as pd
 
-# %% outputHidden=false inputHidden=false
+# %% inputHidden=false outputHidden=false
 df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},
                   index=pd.Index(['x0', 'x1'], name='x'))
 df
 
-# %% outputHidden=false inputHidden=false
+# %% inputHidden=false outputHidden=false
 # %matplotlib inline
 df.plot(kind='bar')
diff --git a/tests/notebooks/mirror/ipynb_to_script/nteract_with_parameter.py b/tests/notebooks/mirror/ipynb_to_script/nteract_with_parameter.py
index 27c08e640..cebdcef8b 100644
--- a/tests/notebooks/mirror/ipynb_to_script/nteract_with_parameter.py
+++ b/tests/notebooks/mirror/ipynb_to_script/nteract_with_parameter.py
@@ -8,17 +8,17 @@
 #     name: python3
 # ---
 
-# + outputHidden=false inputHidden=false tags=["parameters"]
+# + inputHidden=false outputHidden=false tags=["parameters"]
 param = 4
 
-# + outputHidden=false inputHidden=false
+# + inputHidden=false outputHidden=false
 import pandas as pd
 
-# + outputHidden=false inputHidden=false
+# + inputHidden=false outputHidden=false
 df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},
                   index=pd.Index(['x0', 'x1'], name='x'))
 df
 
-# + outputHidden=false inputHidden=false
+# + inputHidden=false outputHidden=false
 # %matplotlib inline
 df.plot(kind='bar')
diff --git a/tests/notebooks/mirror/ipynb_to_script_vim_folding_markers/nteract_with_parameter.py b/tests/notebooks/mirror/ipynb_to_script_vim_folding_markers/nteract_with_parameter.py
index 747ce9242..c1ad5ecdb 100644
--- a/tests/notebooks/mirror/ipynb_to_script_vim_folding_markers/nteract_with_parameter.py
+++ b/tests/notebooks/mirror/ipynb_to_script_vim_folding_markers/nteract_with_parameter.py
@@ -10,21 +10,21 @@
 #     name: python3
 # ---
 
-# {{{ outputHidden=false inputHidden=false tags=["parameters"]
+# {{{ inputHidden=false outputHidden=false tags=["parameters"]
 param = 4
 # }}}
 
-# {{{ outputHidden=false inputHidden=false
+# {{{ inputHidden=false outputHidden=false
 import pandas as pd
 # }}}
 
-# {{{ outputHidden=false inputHidden=false
+# {{{ inputHidden=false outputHidden=false
 df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},
                   index=pd.Index(['x0', 'x1'], name='x'))
 df
 # }}}
 
-# {{{ outputHidden=false inputHidden=false
+# {{{ inputHidden=false outputHidden=false
 # %matplotlib inline
 df.plot(kind='bar')
 # }}}
diff --git a/tests/notebooks/mirror/ipynb_to_script_vscode_folding_markers/nteract_with_parameter.py b/tests/notebooks/mirror/ipynb_to_script_vscode_folding_markers/nteract_with_parameter.py
index b17524932..05850db51 100644
--- a/tests/notebooks/mirror/ipynb_to_script_vscode_folding_markers/nteract_with_parameter.py
+++ b/tests/notebooks/mirror/ipynb_to_script_vscode_folding_markers/nteract_with_parameter.py
@@ -10,21 +10,21 @@
 #     name: python3
 # ---
 
-# region outputHidden=false inputHidden=false tags=["parameters"]
+# region inputHidden=false outputHidden=false tags=["parameters"]
 param = 4
 # endregion
 
-# region outputHidden=false inputHidden=false
+# region inputHidden=false outputHidden=false
 import pandas as pd
 # endregion
 
-# region outputHidden=false inputHidden=false
+# region inputHidden=false outputHidden=false
 df = pd.DataFrame({'A': [1, 2], 'B': [3 + param, 4]},
                   index=pd.Index(['x0', 'x1'], name='x'))
 df
 # endregion
 
-# region outputHidden=false inputHidden=false
+# region inputHidden=false outputHidden=false
 # %matplotlib inline
 df.plot(kind='bar')
 # endregion
diff --git a/tests/test_jupytext_nbconvert_round_trip.py b/tests/test_jupytext_nbconvert_round_trip.py
index 7560e57e2..4bd6022d6 100644
--- a/tests/test_jupytext_nbconvert_round_trip.py
+++ b/tests/test_jupytext_nbconvert_round_trip.py
@@ -48,9 +48,10 @@ def test_jupytext_markdown_similar_to_nbconvert(nb_file):
 
     # Remove cell outputs and metadata
     for cell in nb.cells:
-        cell.outputs = []
-        cell.execution_count = None
-        cell.metadata = {}
+        if "outputs" in cell:
+            cell.outputs = []
+        if "metadata" in cell:
+            cell.metadata = {}
 
     md_jupytext = jupytext.writes(nb, fmt="md")
 
diff --git a/tests/test_sample_notebooks_are_normalized.py b/tests/test_sample_notebooks_are_normalized.py
new file mode 100644
index 000000000..54c65fc40
--- /dev/null
+++ b/tests/test_sample_notebooks_are_normalized.py
@@ -0,0 +1,23 @@
+import nbformat
+import pytest
+
+import jupytext
+
+from .utils import list_notebooks
+
+
+@pytest.mark.skipif(nbformat.__version__ <= "5.7", reason="normalize is not available")
+@pytest.mark.parametrize("nb_file", list_notebooks("all", skip="(invalid|pyc)"))
+def test_sample_notebooks_are_normalized(nb_file):
+    nb = jupytext.read(nb_file)
+
+    changes, normalized_nb = nbformat.validator.normalize(nb)
+    nbformat.validate(normalized_nb)
+
+    if changes:  # pragma: no cover
+        with open(nb_file, "w") as fp:
+            jupytext.write(normalized_nb, fp)
+
+        assert not changes
+
+    nbformat.validate(nb)
diff --git a/tests/utils.py b/tests/utils.py
index 964c9d4fd..d5495d9ae 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -1,5 +1,5 @@
+import itertools
 import json
-import os
 import re
 import sys
 from pathlib import Path
@@ -99,34 +99,36 @@ def list_notebooks(path="ipynb", skip="World"):
             + list_notebooks("ipynb_R", skip=skip)
         )
 
-    if path == "ipynb_all":
-        all_notebooks = []
+    nb_path = Path(__file__).parent / "notebooks"
 
-        nb_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "notebooks")
-        for dir in os.listdir(nb_path):
-            if dir.startswith("ipynb_"):
-                all_notebooks.extend(list_notebooks(dir, skip=skip))
+    if path == "ipynb_all":
+        return itertools.chain(
+            *(
+                list_notebooks(folder.name, skip=skip)
+                for folder in nb_path.iterdir()
+                if folder.name.startswith("ipynb_")
+            )
+        )
 
-        return all_notebooks
+    if path == "all":
+        return itertools.chain(
+            *(list_notebooks(folder.name, skip=skip) for folder in nb_path.iterdir())
+        )
 
-    nb_path = os.path.dirname(os.path.abspath(__file__))
     if path.startswith("."):
-        nb_path = os.path.join(nb_path, path)
+        nb_path = nb_path / ".." / path
     else:
-        nb_path = os.path.join(nb_path, "notebooks", path)
+        nb_path = nb_path / path
 
     if skip:
         skip_re = re.compile(".*" + skip + ".*")
-        notebooks = [
-            os.path.join(nb_path, nb_file)
-            for nb_file in os.listdir(nb_path)
-            if not skip_re.match(nb_file)
+        return [
+            str(nb_file)
+            for nb_file in nb_path.iterdir()
+            if nb_file.is_file() and not skip_re.match(nb_file.name)
         ]
-    else:
-        notebooks = [os.path.join(nb_path, nb_file) for nb_file in os.listdir(nb_path)]
 
-    # ignore ".ipynb_checkpoints" sub-folder
-    return [nb_file for nb_file in notebooks if os.path.isfile(nb_file)]
+    return [str(nb_file) for nb_file in nb_path.iterdir() if nb_file.is_file()]
 
 
 def notebook_model(nb):