コード例 #1
0
ファイル: test_markdown_to_html.py プロジェクト: jduan/pants
  def test_include_end_before(self):
    self.assertEquals(
      markdown_to_html_utils.choose_include_text(ABC, 'end-before=abl', 'fake.md'),
      '')

    self.assertEquals(
      markdown_to_html_utils.choose_include_text(ABC, 'end-before=xxx', 'fake.md'),
      '')

    self.assertEquals(
      markdown_to_html_utils.choose_include_text(ABC, 'end-before=bak', 'fake.md'),
      'able')
コード例 #2
0
ファイル: test_markdown_to_html.py プロジェクト: jduan/pants
  def test_include_start_after(self):
    self.assertEquals(
      markdown_to_html_utils.choose_include_text(ABC, 'start-after=bak', 'fake.md'),
      'charlie')

    self.assertEquals(
      markdown_to_html_utils.choose_include_text(ABC, 'start-after=cha', 'fake.md'),
      '')

    self.assertEquals(
      markdown_to_html_utils.choose_include_text(ABC, 'start-after=xxx', 'fake.md'),
      '')
コード例 #3
0
ファイル: test_markdown_to_html.py プロジェクト: jduan/pants
  def test_include_end_at(self):
    self.assertEquals(
      markdown_to_html_utils.choose_include_text(ABC, 'end-at=abl', 'fake.md'),
      'able')

    self.assertEquals(
      markdown_to_html_utils.choose_include_text(ABC, 'end-at=bak', 'fake.md'),
      '\n'.join(['able', 'baker']))

    self.assertEquals(
      markdown_to_html_utils.choose_include_text(ABC, 'end-at=xxx', 'fake.md'),
      '')
コード例 #4
0
    def test_include_end_before(self):
        self.assertEquals(
            markdown_to_html_utils.choose_include_text(ABC, 'end-before=abl',
                                                       'fake.md'), '')

        self.assertEquals(
            markdown_to_html_utils.choose_include_text(ABC, 'end-before=xxx',
                                                       'fake.md'), '')

        self.assertEquals(
            markdown_to_html_utils.choose_include_text(ABC, 'end-before=bak',
                                                       'fake.md'), 'able')
コード例 #5
0
ファイル: test_markdown_to_html.py プロジェクト: jduan/pants
  def test_include_start_at(self):
    self.assertEquals(
        markdown_to_html_utils.choose_include_text(ABC, 'start-at=abl', 'fake.md'),
        '\n'.join(['able', 'baker', 'charlie']))

    self.assertEquals(
        markdown_to_html_utils.choose_include_text(ABC, 'start-at=bak', 'fake.md'),
        '\n'.join(['baker', 'charlie']))

    self.assertEquals(
      markdown_to_html_utils.choose_include_text(ABC, 'start-at=xxx', 'fake.md'),
      '')
コード例 #6
0
    def test_include_start_after(self):
        self.assertEquals(
            markdown_to_html_utils.choose_include_text(ABC, 'start-after=bak',
                                                       'fake.md'), 'charlie')

        self.assertEquals(
            markdown_to_html_utils.choose_include_text(ABC, 'start-after=cha',
                                                       'fake.md'), '')

        self.assertEquals(
            markdown_to_html_utils.choose_include_text(ABC, 'start-after=xxx',
                                                       'fake.md'), '')
コード例 #7
0
    def test_include_end_at(self):
        self.assertEquals(
            markdown_to_html_utils.choose_include_text(ABC, 'end-at=abl',
                                                       'fake.md'), 'able')

        self.assertEquals(
            markdown_to_html_utils.choose_include_text(ABC, 'end-at=bak',
                                                       'fake.md'),
            '\n'.join(['able', 'baker']))

        self.assertEquals(
            markdown_to_html_utils.choose_include_text(ABC, 'end-at=xxx',
                                                       'fake.md'), '')
コード例 #8
0
    def test_include_start_at(self):
        self.assertEquals(
            markdown_to_html_utils.choose_include_text(ABC, 'start-at=abl',
                                                       'fake.md'),
            '\n'.join(['able', 'baker', 'charlie']))

        self.assertEquals(
            markdown_to_html_utils.choose_include_text(ABC, 'start-at=bak',
                                                       'fake.md'),
            '\n'.join(['baker', 'charlie']))

        self.assertEquals(
            markdown_to_html_utils.choose_include_text(ABC, 'start-at=xxx',
                                                       'fake.md'), '')
コード例 #9
0
ファイル: test_markdown_to_html.py プロジェクト: jduan/pants
 def test_include_no_params(self):
   self.assertEquals(
       markdown_to_html_utils.choose_include_text(ABC, '', 'fake.md'),
       '\n'.join(['able', 'baker', 'charlie']))
コード例 #10
0
 def test_include_no_params(self):
     self.assertEquals(
         markdown_to_html_utils.choose_include_text(ABC, '', 'fake.md'),
         '\n'.join(['able', 'baker', 'charlie']))