unittest +write_dot +read_dot2

This commit is contained in:
Costa Shulyupin 2018-08-12 23:27:49 +03:00
parent e80f36d8e4
commit e9a1a576b1
1 changed files with 3 additions and 0 deletions

View File

@ -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])