File: test_json.py

package info (click to toggle)
nbformat 5.10.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,072 kB
  • sloc: python: 4,746; makefile: 167; javascript: 2
file content (13 lines) | stat: -rw-r--r-- 263 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
from __future__ import annotations

from unittest import TestCase

from nbformat.v1.nbjson import reads, writes

from .nbexamples import nb0


class TestJSON(TestCase):
    def test_roundtrip(self):
        s = writes(nb0)
        self.assertEqual(reads(s), nb0)