Beispiel #1
0
 def test_md_file_nested(self):
     f = File('foo/bar.md',
              '/path/to/docs',
              '/path/to/site',
              use_directory_urls=False)
     self.assertPathsEqual(f.src_path, 'foo/bar.md')
     self.assertPathsEqual(f.abs_src_path, '/path/to/docs/foo/bar.md')
     self.assertPathsEqual(f.dest_path, 'foo/bar.html')
     self.assertPathsEqual(f.abs_dest_path, '/path/to/site/foo/bar.html')
     self.assertEqual(f.url, 'foo/bar.html')
     self.assertEqual(f.name, 'bar')
     self.assertTrue(f.is_documentation_page())
     self.assertFalse(f.is_static_page())
     self.assertFalse(f.is_media_file())
     self.assertFalse(f.is_javascript())
     self.assertFalse(f.is_css())
Beispiel #2
0
 def test_md_readme_index_file_use_directory_urls(self):
     f = File('README.md',
              '/path/to/docs',
              '/path/to/site',
              use_directory_urls=True)
     self.assertPathsEqual(f.src_path, 'README.md')
     self.assertPathsEqual(f.abs_src_path, '/path/to/docs/README.md')
     self.assertPathsEqual(f.dest_path, 'index.html')
     self.assertPathsEqual(f.abs_dest_path, '/path/to/site/index.html')
     self.assertEqual(f.url, '.')
     self.assertEqual(f.name, 'index')
     self.assertTrue(f.is_documentation_page())
     self.assertFalse(f.is_static_page())
     self.assertFalse(f.is_media_file())
     self.assertFalse(f.is_javascript())
     self.assertFalse(f.is_css())