Example #1
0
def test_test_round_trip_conversion():
    notebook = new_notebook(cells=[
        new_code_cell('1+1',
                      outputs=[{
                          "data": {
                              "text/plain": ["2"]
                          },
                          "execution_count": 1,
                          "metadata": {},
                          "output_type": "execute_result"
                      }])
    ],
                            metadata={'main_language': 'python'})

    round_trip_conversion(notebook, {'extension': '.py'}, update=True)
Example #2
0
def test_test_round_trip_conversion():
    notebook = new_notebook(
        cells=[
            new_code_cell(
                "1+1",
                outputs=[{
                    "data": {
                        "text/plain": ["2"]
                    },
                    "execution_count": 1,
                    "metadata": {},
                    "output_type": "execute_result",
                }],
            )
        ],
        metadata={"main_language": "python"},
    )

    round_trip_conversion(notebook, {"extension": ".py"}, update=True)