Пример #1
0
        public void TestReadingJpyterDocument2()
        {
            var jupyterText = JupyterDocumentHelper.GetFileStringByFileName("01-Python Crash Course.ipynb");
            var document    = Jupyter.Parse(jupyterText);

            Assert.IsTrue(document != null); //Phase success
        }
Пример #2
0
        public void TestReadingJpyterDocument1()
        {
            var jupyterText = JupyterDocumentHelper.GetFileStringByFileName("Discover Sentiments in Tweets.ipynb");
            var document    = Jupyter.Parse(jupyterText);

            Assert.IsTrue(document != null); //Phase success
        }
Пример #3
0
        public void TestReadingJpyterDocument2()
        {
            var jupyterText = JupyterDocumentHelper.GetFileStringByFileName("01-Python Crash Course.ipynb");
            var document    = Jupyter.Parse(jupyterText);

            //convert to html and open
            ConvertDocumentToHtmlFile(document, "01-Python Crash Course.pdf", false);
        }
Пример #4
0
        public void TestReadingJpyterDocument1()
        {
            var jupyterText = JupyterDocumentHelper.GetFileStringByFileName("Discover Sentiments in Tweets.ipynb");
            var document    = Jupyter.Parse(jupyterText);

            //convert to html and open
            ConvertDocumentToHtmlFile(document, "Discover Sentiments in Tweets.pdf", false);
        }
        public void TestReadingJpyterDocument2()
        {
            var jupyterText = JupyterDocumentHelper.GetFileStringByFileName("01-Python Crash Course.ipynb");
            var document    = Jupyter.Parse(jupyterText);

            //convert to json
            var documentJson = ConvertDocumentToJson(document);

            //convert to document again
            var document2 = Jupyter.Parse(documentJson);

            //Two class's property should be equal
            Assert.IsTrue(CompareHelper.CompareWithJsonFormat(document, document2));
        }
        public void TestReadingJpyterDocument1()
        {
            var jupyterText = JupyterDocumentHelper.GetFileStringByFileName("Discover Sentiments in Tweets.ipynb");
            var document    = Jupyter.Parse(jupyterText);

            //convert to json
            var documentJson = ConvertDocumentToJson(document);

            //convert to document again
            var document2 = Jupyter.Parse(documentJson);

            //Two class's property should be equal
            Assert.IsTrue(CompareHelper.CompareWithJsonFormat(document, document2));

            //Change name
            document2.Metadata.KernelInfo.Name = "AAAA";

            //Should not equal
            Assert.IsFalse(CompareHelper.CompareWithJsonFormat(document, document2));
        }