예제 #1
0
 def resolve(self, uri):
     """
     Banana banana
     """
     return resolve(uri, self.project.include_paths)
예제 #2
0
 def test_resolve_wrong_path(self):
     self.assertEqual(resolve('yep.x', []), None)
예제 #3
0
 def test_resolve_different_lang(self):
     _ = self._create_src_file('yep.x', ['foo', 'bar', 'baz'])
     self.assertEqual(resolve('yep.x', [self._src_dir]),
                      '\n``` x\nfoo\nbar\nbaz\n\n```\n')
예제 #4
0
 def test_resolve_linenos(self):
     _ = self._create_md_file('yep.md', 'foo\nbar\nbaz\nfoobar\n')
     self.assertEqual(resolve('yep.md[1:3]', [self._md_dir]), 'bar\nbaz\n')
예제 #5
0
 def test_resolve_wrong_linenos(self):
     _ = self._create_md_file('yep.md', 'stuff')
     self.assertEqual(resolve('yep.md[4:7:9]', [self._md_dir]), None)
     self.assertEqual(resolve('yep.md[4:7]', [self._md_dir]), None)
예제 #6
0
 def test_resolve(self):
     _ = self._create_md_file('yep.md', 'stuff')
     self.assertEqual(resolve('yep.md', [self._md_dir]), 'stuff')