Пример #1
0
    def test_include_start_after(self):
        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, 'start-after=bak',
                                                       'fake.md'), 'charlie')

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

        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, 'start-after=xxx',
                                                       'fake.md'), '')
Пример #2
0
    def test_include_end_before(self):
        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, 'end-before=abl',
                                                       'fake.md'), '')

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

        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, 'end-before=bak',
                                                       'fake.md'), 'able')
Пример #3
0
    def test_include_end_before(self):
        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, "end-before=abl",
                                                       "fake.md"), "")

        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, "end-before=xxx",
                                                       "fake.md"), "")

        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, "end-before=bak",
                                                       "fake.md"), "able")
Пример #4
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'),
      '')
Пример #5
0
    def test_include_start_after(self):
        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, "start-after=bak",
                                                       "fake.md"), "charlie")

        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, "start-after=cha",
                                                       "fake.md"), "")

        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, "start-after=xxx",
                                                       "fake.md"), "")
Пример #6
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')
Пример #7
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'),
      '')
Пример #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
    def test_include_end_at(self):
        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, "end-at=abl", "fake.md"), "able"
        )

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

        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, "end-at=xxx", "fake.md"), ""
        )
Пример #10
0
    def test_include_start_at(self):
        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, "start-at=abl", "fake.md"),
            "\n".join(["able", "baker", "charlie"]),
        )

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

        self.assertEqual(
            markdown_to_html_utils.choose_include_text(ABC, "start-at=xxx", "fake.md"), ""
        )
Пример #11
0
 def test_include_no_params(self):
     self.assertEqual(
         markdown_to_html_utils.choose_include_text(ABC, '', 'fake.md'),
         '\n'.join(['able', 'baker', 'charlie']))
Пример #12
0
 def test_include_no_params(self):
     self.assertEqual(
         markdown_to_html_utils.choose_include_text(ABC, "", "fake.md"),
         "\n".join(["able", "baker", "charlie"]),
     )
Пример #13
0
 def test_include_no_params(self):
   self.assertEquals(
       markdown_to_html_utils.choose_include_text(ABC, '', 'fake.md'),
       '\n'.join(['able', 'baker', 'charlie']))