Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/p/i/piecutter-0.1.1/piecutter/tests/resources.py   piecutter(Download)
    def test_init(self):
        """Resource constructor accepts optional ``path`` and ``engine``."""
        resource = resources.Resource()
        self.assertEqual(resource.path, '')
        self.assertEqual(resource.engine, None)
        resource = resources.Resource('path', 'engine')
        self.assertEqual(resource.path, 'path')
        self.assertEqual(resource.engine, 'engine')
        resource = resources.Resource(engine='engine', path='path')
    def test_exists(self):
        """Resource.exists property must be overriden by subclasses."""
        resource = resources.Resource()
        self.assertRaises(NotImplementedError, lambda: resource.exists)
 
    def test_content_type(self):
        """Resource.content_type property must be overriden by subclasses."""
        resource = resources.Resource()