test: add -> None return type annotations to all test methods
This commit is contained in:
@@ -14,14 +14,14 @@ from shellhist.core.patterns import (
|
|||||||
class TestNgramAnalysis:
|
class TestNgramAnalysis:
|
||||||
"""Test n-gram analysis functionality."""
|
"""Test n-gram analysis functionality."""
|
||||||
|
|
||||||
def test_empty_store(self):
|
def test_empty_store(self) -> None:
|
||||||
"""Test with empty store."""
|
"""Test with empty store."""
|
||||||
store = HistoryStore()
|
store = HistoryStore()
|
||||||
results = ngram_analysis(store, n=2)
|
results = ngram_analysis(store, n=2)
|
||||||
|
|
||||||
assert len(results) == 0
|
assert len(results) == 0
|
||||||
|
|
||||||
def test_simple_pairs(self):
|
def test_simple_pairs(self) -> None:
|
||||||
"""Test detecting command pairs."""
|
"""Test detecting command pairs."""
|
||||||
store = HistoryStore()
|
store = HistoryStore()
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ class TestNgramAnalysis:
|
|||||||
pair = results[0]
|
pair = results[0]
|
||||||
assert "git status -> git log" in " -> ".join(pair.commands)
|
assert "git status -> git log" in " -> ".join(pair.commands)
|
||||||
|
|
||||||
def test_triplets(self):
|
def test_triplets(self) -> None:
|
||||||
"""Test detecting command triplets."""
|
"""Test detecting command triplets."""
|
||||||
store = HistoryStore()
|
store = HistoryStore()
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ class TestNgramAnalysis:
|
|||||||
assert len(results) == 1
|
assert len(results) == 1
|
||||||
assert results[0].frequency == 2
|
assert results[0].frequency == 2
|
||||||
|
|
||||||
def test_min_frequency_filter(self):
|
def test_min_frequency_filter(self) -> None:
|
||||||
"""Test minimum frequency filtering."""
|
"""Test minimum frequency filtering."""
|
||||||
store = HistoryStore()
|
store = HistoryStore()
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ class TestNgramAnalysis:
|
|||||||
class TestDetectRepetitiveCommands:
|
class TestDetectRepetitiveCommands:
|
||||||
"""Test repetitive command detection."""
|
"""Test repetitive command detection."""
|
||||||
|
|
||||||
def test_detect_repetitive(self):
|
def test_detect_repetitive(self) -> None:
|
||||||
"""Test detecting repetitive single commands."""
|
"""Test detecting repetitive single commands."""
|
||||||
store = HistoryStore()
|
store = HistoryStore()
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ class TestDetectRepetitiveCommands:
|
|||||||
assert results[0].commands == ("git status",)
|
assert results[0].commands == ("git status",)
|
||||||
assert results[0].frequency == 5
|
assert results[0].frequency == 5
|
||||||
|
|
||||||
def test_no_repetitive_commands(self):
|
def test_no_repetitive_commands(self) -> None:
|
||||||
"""Test when no commands are repetitive."""
|
"""Test when no commands are repetitive."""
|
||||||
store = HistoryStore()
|
store = HistoryStore()
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ class TestDetectRepetitiveCommands:
|
|||||||
class TestDetectCommandPairs:
|
class TestDetectCommandPairs:
|
||||||
"""Test command pair detection."""
|
"""Test command pair detection."""
|
||||||
|
|
||||||
def test_detect_pairs(self):
|
def test_detect_pairs(self) -> None:
|
||||||
"""Test detecting command pairs."""
|
"""Test detecting command pairs."""
|
||||||
store = HistoryStore()
|
store = HistoryStore()
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ class TestDetectCommandPairs:
|
|||||||
class TestDetectCommandTriplets:
|
class TestDetectCommandTriplets:
|
||||||
"""Test command triplet detection."""
|
"""Test command triplet detection."""
|
||||||
|
|
||||||
def test_detect_triplets(self):
|
def test_detect_triplets(self) -> None:
|
||||||
"""Test detecting command triplets."""
|
"""Test detecting command triplets."""
|
||||||
store = HistoryStore()
|
store = HistoryStore()
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ class TestDetectCommandTriplets:
|
|||||||
class TestDetectCommonSequences:
|
class TestDetectCommonSequences:
|
||||||
"""Test common sequence detection."""
|
"""Test common sequence detection."""
|
||||||
|
|
||||||
def test_detect_sequences_various_lengths(self):
|
def test_detect_sequences_various_lengths(self) -> None:
|
||||||
"""Test detecting sequences of various lengths."""
|
"""Test detecting sequences of various lengths."""
|
||||||
store = HistoryStore()
|
store = HistoryStore()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user