Skip to content

Commit 9aa2fd3

Browse files
Copilotjmeridth
andcommitted
fix: resolve linting issues in test files
Co-authored-by: jmeridth <[email protected]>
1 parent 3a29d67 commit 9aa2fd3

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

test_assignee_functionality.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import unittest
55
from unittest.mock import patch
66

7+
from classes import IssueWithMetrics
78
from markdown_writer import get_non_hidden_columns
89

910

@@ -97,14 +98,16 @@ def test_assignee_column_position(self):
9798

9899
def test_multiple_assignees_rendering_logic(self):
99100
"""Test that multiple assignees are rendered correctly in assignee column."""
100-
from io import StringIO
101-
102-
from classes import IssueWithMetrics
103101

104102
# Test the assignee rendering logic directly
105103
endpoint = "github.com"
106104
columns = ["Title", "URL", "Assignee", "Author"]
107105

106+
# Initialize variables
107+
multiple_output = ""
108+
single_output = ""
109+
none_output = ""
110+
108111
# Test case 1: Multiple assignees
109112
issue_multiple = IssueWithMetrics(
110113
title="Test Issue with Multiple Assignees",
@@ -125,7 +128,10 @@ def test_multiple_assignees_rendering_logic(self):
125128
else:
126129
multiple_output = " None |"
127130

128-
expected_multiple = " [alice](https://github.com/alice), [bob](https://github.com/bob), [charlie](https://github.com/charlie) |"
131+
expected_multiple = (
132+
" [alice](https://github.com/alice), [bob](https://github.com/bob), "
133+
"[charlie](https://github.com/charlie) |"
134+
)
129135
self.assertEqual(
130136
multiple_output,
131137
expected_multiple,

test_markdown_writer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ def test_write_to_markdown_with_vertical_bar_in_title(self):
255255
"| Issue 1 | https://github.com/user/repo/issues/1 | [charlie](https://github.com/charlie) | "
256256
"[alice](https://github.com/alice) | 1 day, 0:00:00 | 2 days, 0:00:00 | 3 days, 0:00:00 | "
257257
"1 day, 0:00:00 | 1 day, 0:00:00 | -5 days, 0:00:00 |\n"
258-
"| feat&#124; Issue 2 | https://github.com/user/repo/issues/2 | None | [bob](https://github.com/bob) | 3 days, 0:00:00 | "
258+
"| feat&#124; Issue 2 | https://github.com/user/repo/issues/2 | None | "
259+
"[bob](https://github.com/bob) | 3 days, 0:00:00 | "
259260
"4 days, 0:00:00 | 5 days, 0:00:00 | None | 2 days, 0:00:00 | -5 days, 0:00:00 |\n\n"
260261
"_This report was generated with the [Issue Metrics Action](https://github.com/github/issue-metrics)_\n"
261262
)

0 commit comments

Comments
 (0)