Пример #1
0
    def test_include_end_before(self):
        self.assertEquals(
            markdown_to_html.choose_include_lines(ABC, 'end-before=abl',
                                                  'fake.md'), [])

        self.assertEquals(
            markdown_to_html.choose_include_lines(ABC, 'end-before=xxx',
                                                  'fake.md'), [])

        self.assertEquals(
            markdown_to_html.choose_include_lines(ABC, 'end-before=bak',
                                                  'fake.md'), ['able'])
Пример #2
0
    def test_include_start_after(self):
        self.assertEquals(
            markdown_to_html.choose_include_lines(ABC, 'start-after=bak',
                                                  'fake.md'), ['charlie'])

        self.assertEquals(
            markdown_to_html.choose_include_lines(ABC, 'start-after=cha',
                                                  'fake.md'), [])

        self.assertEquals(
            markdown_to_html.choose_include_lines(ABC, 'start-after=xxx',
                                                  'fake.md'), [])
Пример #3
0
  def test_include_end_before(self):
    self.assertEquals(
      markdown_to_html.choose_include_lines(ABC, 'end-before=abl', 'fake.md'),
      [])

    self.assertEquals(
      markdown_to_html.choose_include_lines(ABC, 'end-before=xxx', 'fake.md'),
      [])

    self.assertEquals(
      markdown_to_html.choose_include_lines(ABC, 'end-before=bak', 'fake.md'),
      ['able'])
Пример #4
0
  def test_include_end_at(self):
    self.assertEquals(
      markdown_to_html.choose_include_lines(ABC, 'end-at=abl', 'fake.md'),
      ['able'])

    self.assertEquals(
      markdown_to_html.choose_include_lines(ABC, 'end-at=bak', 'fake.md'),
      ['able', 'baker'])

    self.assertEquals(
      markdown_to_html.choose_include_lines(ABC, 'end-at=xxx', 'fake.md'),
      [])
Пример #5
0
  def test_include_start_after(self):
    self.assertEquals(
      markdown_to_html.choose_include_lines(ABC, 'start-after=bak', 'fake.md'),
      ['charlie'])

    self.assertEquals(
      markdown_to_html.choose_include_lines(ABC, 'start-after=cha', 'fake.md'),
      [])

    self.assertEquals(
      markdown_to_html.choose_include_lines(ABC, 'start-after=xxx', 'fake.md'),
      [])
Пример #6
0
  def test_include_start_at(self):
    self.assertEquals(
        markdown_to_html.choose_include_lines(ABC, 'start-at=abl', 'fake.md'),
        ['able', 'baker', 'charlie'])

    self.assertEquals(
        markdown_to_html.choose_include_lines(ABC, 'start-at=bak', 'fake.md'),
        ['baker', 'charlie'])

    self.assertEquals(
      markdown_to_html.choose_include_lines(ABC, 'start-at=xxx', 'fake.md'),
      [])
Пример #7
0
    def test_include_end_at(self):
        self.assertEquals(
            markdown_to_html.choose_include_lines(ABC, 'end-at=abl',
                                                  'fake.md'), ['able'])

        self.assertEquals(
            markdown_to_html.choose_include_lines(ABC, 'end-at=bak',
                                                  'fake.md'),
            ['able', 'baker'])

        self.assertEquals(
            markdown_to_html.choose_include_lines(ABC, 'end-at=xxx',
                                                  'fake.md'), [])
Пример #8
0
    def test_include_start_at(self):
        self.assertEquals(
            markdown_to_html.choose_include_lines(ABC, 'start-at=abl',
                                                  'fake.md'),
            ['able', 'baker', 'charlie'])

        self.assertEquals(
            markdown_to_html.choose_include_lines(ABC, 'start-at=bak',
                                                  'fake.md'),
            ['baker', 'charlie'])

        self.assertEquals(
            markdown_to_html.choose_include_lines(ABC, 'start-at=xxx',
                                                  'fake.md'), [])
Пример #9
0
 def test_include_no_params(self):
     self.assertEquals(
         markdown_to_html.choose_include_lines(ABC, '', 'fake.md'),
         ['able', 'baker', 'charlie'])
Пример #10
0
 def test_include_no_params(self):
   self.assertEquals(
       markdown_to_html.choose_include_lines(ABC, '', 'fake.md'),
       ['able', 'baker', 'charlie'])