Skip to content

Commit b0c8535

Browse files
committed
Add comments for the "FIXME" comments
1 parent 2b2b2f4 commit b0c8535

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

about_code_tool/tests/test_about.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)