From e9a1a576b15faf0f759a87f43e9e6431b29481f1 Mon Sep 17 00:00:00 2001 From: Costa Shulyupin Date: Sun, 12 Aug 2018 23:27:49 +0300 Subject: [PATCH] unittest +write_dot +read_dot2 --- srcxray.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/srcxray.py b/srcxray.py index 13ac375..1a1f73d 100755 --- a/srcxray.py +++ b/srcxray.py @@ -873,6 +873,9 @@ def usage(): class _unittest_autotest(unittest.TestCase): def test_1(self): + write_dot(nx.DiGraph([(1, 2), (2, 3), (2, 4)]), 'test.dot') + g = read_dot2("test.dot") + self.assertEqual(list(g.successors("2")), ["3", "4"]) self.assertTrue(os.path.isdir('include/linux/')) os.chdir('init') self.assertEqual('\t\t\t\t\tprepare_namespace ^', popen('srcxray.py referers_tree nfs_root_data')[-1])