Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Miryam-Schwartz committed Dec 10, 2024
1 parent 042d4c8 commit 49bf325
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ufm_log_analyzer_ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ jobs:
pip install -r src/loganalyze/requirements.txt
pip install pytest
pytest
pytest /unit_tests
5 changes: 4 additions & 1 deletion plugins/ufm_log_analyzer_plugin/src/loganalyze/.pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ disable=missing-function-docstring,

[DESIGN]
max-locals=20
max-args=8
max-args=8

[unit_tests/*]
disable=protected-access
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def analyzer():
def test_get_fabric_size(analyzer):
# Mock the _log_data_sorted attribute
expected_fabric_size = {"switch_count": 10, "link_count": 50} # Example data
analyzer._log_data_sorted = expected_fabric_size # pylint: disable=protected-access
analyzer._log_data_sorted = expected_fabric_size

# Call the method and check the result
result = analyzer.get_fabric_size()
assert result == expected_fabric_size
assert result == expected_fabric_size, "get_fabric_size should return _log_data_sorted"
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ def test_add_analyzer(analyzer):
mock_analyzer_2 = "Analyzer2"

# Initially, the list should be empty
assert len(analyzer._analyzers) == 0 # pylint: disable=protected-access
assert len(analyzer._analyzers) == 0

# Add first analyzer and check the length
analyzer.add_analyzer(mock_analyzer_1)
assert len(analyzer._analyzers) == 1 # pylint: disable=protected-access
assert mock_analyzer_1 in analyzer._analyzers # pylint: disable=protected-access
assert len(analyzer._analyzers) == 1
assert mock_analyzer_1 in analyzer._analyzers

# Add second analyzer and check the updated length
analyzer.add_analyzer(mock_analyzer_2)
assert len(analyzer._analyzers) == 2 # pylint: disable=protected-access
assert mock_analyzer_2 in analyzer._analyzers # pylint: disable=protected-access
assert len(analyzer._analyzers) == 2
assert mock_analyzer_2 in analyzer._analyzers

0 comments on commit 49bf325

Please sign in to comment.