class TestPath(unittest.TestCase): def setUp(self): self.a_path = Path( [ e for e in xrange(10 ) ] ) def test_build(self): self.assertEqual( self.a_path, ( 0, 1, 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9) ) def test_startswith(self): self.assertEqual( self.a_path.startswith( 0, 1 , 2 ), True ) def test_endswith(self): self.assertEqual( self.a_path.endswith( 8, 9), True ) def test_contains1(self): self.assertEqual( self.a_path.contains( 2 , 3 , 4 ), True ) def test_contains1(self): self.assertEqual( self.a_path.contains( 0, 1 , 2 ), True )
def setUp(self): self.a_path = Path( [ e for e in xrange(10 ) ] )