Beispiel #1
0
    def compare_indent_empty(self, data, expected, **kwargs):
        assert abs_urls(data, **kwargs) == expected

        data_no_indent = [line.strip() for line in data]
        expected_no_indent = [line.strip() for line in expected]
        assert abs_urls(data_no_indent, **kwargs) == expected_no_indent

        data_no_empty = [line for line in data if line.strip()]
        expected_no_empty = [line for line in expected if line.strip()]
        assert abs_urls(data_no_empty, **kwargs) == expected_no_empty
Beispiel #2
0
    def compare_indent_empty(self, data, expected, **kwargs):
        assert abs_urls(data, **kwargs) == expected

        data_no_indent = [line.strip() for line in data]
        expected_no_indent = [line.strip() for line in expected]
        assert abs_urls(data_no_indent, **kwargs) == expected_no_indent

        data_no_empty = [line for line in data if line.strip()]
        expected_no_empty = [line for line in expected if line.strip()]
        assert abs_urls(data_no_empty, **kwargs) == expected_no_empty
Beispiel #3
0
 def test_empty(self):
     for data in ([], [""], ["  "]):
         for target_url in ("", " ", "not empty"):
             for image_url in ("", " ", "not empty"):
                 assert abs_urls(data,
                                 target_url=target_url,
                                 image_url=image_url) == data
Beispiel #4
0
 def test_empty(self):
     for data in ([], [""], ["  "]):
         for target_url in ("", " ", "not empty"):
             for image_url in ("", " ", "not empty"):
                 assert abs_urls(data, target_url=target_url,
                                       image_url=image_url) == data