File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,10 @@ def test_return_path_is_not_abspath_and_contains_subdirs_on_file(self):
5959 collector .write_to_csv (output )
6060 expected = 'about_code_tool/tests/testdata/thirdparty/django_snippets_2413.ABOUT'
6161 # FIXME: why [2]? what this test means?
62+ # CY: Since the output is going to have 2 rows (header row and row with
63+ # the test file data), the below partition('\n')[2] means to only read
64+ # the data row and ignroe the header row. This test is to make sure
65+ # the path in the data row is not an absolute path.
6266 with open (output ) as f :
6367 self .assertTrue (f .read ().partition ('\n ' )[2 ].startswith (expected ))
6468
@@ -70,6 +74,10 @@ def test_return_path_is_not_abspath_and_contains_subdirs_on_dir(self):
7074 collector .write_to_csv (output )
7175 expected = '/basic'
7276 # FIXME: why [2]? what this test means?
77+ # CY: Since the output is going to have 2 rows (header row and row with
78+ # the test file data), the below partition('\n')[2] means to only read
79+ # the data row and ignroe the header row. This test is to make sure
80+ # the path in the data row is not an absolute path.
7381 with open (output ) as f :
7482 self .assertTrue (f .read ().partition ('\n ' )[2 ].startswith (expected ))
7583
You can’t perform that action at this time.
0 commit comments