def test_saveDotAndImagesInDifferentDirectories(self):
        """
        Passing different directories to --image-directory and --dot-directory
        writes images and dot files to those directories.
        """
        imageDirectory = 'image'
        dotDirectory = 'dot'
        self.tool(argv=[self.fakeFQPN,
                        '--image-directory', imageDirectory,
                        '--dot-directory', dotDirectory])

        self.assertTrue(any("image" in line
                            for line in self.collectedOutput))
        self.assertTrue(any("dot" in line
                            for line in self.collectedOutput))

        self.assertEqual(len(self.digraphRecorder.renderCalls), 1)
        (renderCall,) = self.digraphRecorder.renderCalls
        self.assertEqual(renderCall["directory"], imageDirectory)
        self.assertTrue(renderCall['cleanup'])

        self.assertEqual(len(self.digraphRecorder.saveCalls), 1)
        (saveCall,) = self.digraphRecorder.saveCalls
        self.assertEqual(saveCall["directory"], dotDirectory)

        Passing different directories to --image-directory and --dot-directory
        writes images and dot files to those directories.
        
stackoverflow/venv/lib/python3.6/site-packages/automat/_test/test_visualize.py