コード例 #1
0
ファイル: test_wget.py プロジェクト: andrewhead/StackSkim
 def testDescribeUnixExecutable(self):
     msg = explain("wget --recursive")
     self.assertEqual(msg, '\n'.join([
         PREAMBLE,
         "--recursive (-r): specify recursive download.",
         ""
     ]))
コード例 #2
0
ファイル: test_wget.py プロジェクト: andrewhead/StackSkim
 def testNoShowShortnameIfOptHasNoShortname(self):
     msg = explain("wget --retry-connrefused")
     self.assertEqual(msg, '\n'.join([
         PREAMBLE,
         "--retry-connrefused: retry even if connection is refused.",
         ""
     ]))
コード例 #3
0
ファイル: test_wget.py プロジェクト: andrewhead/StackSkim
 def testAcceptLongPS1Header(self):
     msg = explain("johnny-o-user:2014 05 06:>>> wget --recursive")
     self.assertEqual(msg, '\n'.join([
         PREAMBLE,
         "--recursive (-r): specify recursive download.",
         ""
     ]))
コード例 #4
0
ファイル: test_wget.py プロジェクト: andrewhead/StackSkim
 def testAcceptPathToExecutable(self):
     msg = explain("dir1/dir2/wget --recursive")
     self.assertEqual(msg, '\n'.join([
         PREAMBLE,
         "--recursive (-r): specify recursive download.",
         ""
     ]))
コード例 #5
0
ファイル: test_wget.py プロジェクト: andrewhead/StackSkim
 def testDescribeOptionCombination(self):
     msg = explain("wget --recursive -A *.jpg -l3 http://google.com")
     self.assertEqual(msg, '\n'.join([
         PREAMBLE + " This command downloads the page at http://google.com.",
         "Recursively scrape web pages linked from http://google.com of type '*.jpg', following links 3 times.",
         "--recursive (-r): specify recursive download.",
         "--accept (-A): *.jpg is a comma-separated list of accepted extensions.",
         "--level (-l): 3 is a maximum recursion depth (inf or 0 for infinite).",
         ""
     ]))
コード例 #6
0
ファイル: test_wget.py プロジェクト: andrewhead/StackSkim
 def testDescribeUrl(self):
     msg = explain("wget http://google.com")
     self.assertEqual(msg, '\n'.join([
         PREAMBLE + " This command downloads the page at http://google.com.",
         ""
     ]))