def testTwistedLoads(self): # NOTE: Update this if 'twisted' version changes. with env.GetInfraPythonPath().Enter(): import twisted self.assertEqual( env.SplitPath(twisted.__file__)[-4:-1], ['third_party', 'twisted_10_2', 'twisted'])
def testRequestsLoads(self): # NOTE: Update this if 'requests' version changes. with env.GetInfraPythonPath().Enter(): import requests self.assertEqual( env.SplitPath(requests.__file__)[-4:-1], ['third_party', 'requests_1_2_3', 'requests'])
def testEmpty(self): self.assertEqual(env.SplitPath(''), [])
def testRelative(self): # NOTE: '/' is enforced as 'os.sep' through '_CommonSystemTestCase'. self.assertEqual(env.SplitPath('a/b/c'), ['a', 'b', 'c'])