Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_robotparser.RobotTestCase Class Reference

List of all members.

Public Member Functions

def __init__
def runTest
def __str__

Public Attributes

 str
 parser
 url
 good
 agent

Detailed Description

Definition at line 8 of file test_robotparser.py.


Constructor & Destructor Documentation

def test.test_robotparser.RobotTestCase.__init__ (   self,
  index,
  parser,
  url,
  good,
  agent 
)

Definition at line 9 of file test_robotparser.py.

00009 
00010     def __init__(self, index, parser, url, good, agent):
00011         unittest.TestCase.__init__(self)
00012         if good:
00013             self.str = "RobotTest(%d, good, %s)" % (index, url)
00014         else:
00015             self.str = "RobotTest(%d, bad, %s)" % (index, url)
00016         self.parser = parser
00017         self.url = url
00018         self.good = good
00019         self.agent = agent

Here is the caller graph for this function:


Member Function Documentation

Definition at line 31 of file test_robotparser.py.

00031 
00032     def __str__(self):
00033         return self.str

Definition at line 20 of file test_robotparser.py.

00020 
00021     def runTest(self):
00022         if isinstance(self.url, tuple):
00023             agent, url = self.url
00024         else:
00025             url = self.url
00026             agent = self.agent
00027         if self.good:
00028             self.assertTrue(self.parser.can_fetch(agent, url))
00029         else:
00030             self.assertFalse(self.parser.can_fetch(agent, url))

Here is the call graph for this function:


Member Data Documentation

Definition at line 18 of file test_robotparser.py.

Definition at line 17 of file test_robotparser.py.

Definition at line 15 of file test_robotparser.py.

Definition at line 12 of file test_robotparser.py.

Definition at line 16 of file test_robotparser.py.


The documentation for this class was generated from the following file: