mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-22 13:25:00 +00:00
style: Fix linter formatting in analytics module
This commit is contained in:
parent
82187f6a71
commit
95c9863d0a
2 changed files with 9 additions and 9 deletions
|
@ -109,29 +109,29 @@ def test_need_to_ask(temp_data_dir):
|
|||
|
||||
def test_is_uuid_in_percentage():
|
||||
analytics = Analytics()
|
||||
|
||||
|
||||
# Test basic percentage thresholds
|
||||
assert analytics.is_uuid_in_percentage("00", 1) is True
|
||||
assert analytics.is_uuid_in_percentage("02", 1) is True
|
||||
assert analytics.is_uuid_in_percentage("03", 1) is False
|
||||
assert analytics.is_uuid_in_percentage("ff", 1) is False
|
||||
|
||||
|
||||
assert analytics.is_uuid_in_percentage("00", 10) is True
|
||||
assert analytics.is_uuid_in_percentage("19", 10) is True
|
||||
assert analytics.is_uuid_in_percentage("1a", 10) is False
|
||||
assert analytics.is_uuid_in_percentage("ff", 10) is False
|
||||
|
||||
|
||||
# Test edge cases
|
||||
assert analytics.is_uuid_in_percentage("00", 0) is False
|
||||
assert analytics.is_uuid_in_percentage("00", 100) is True
|
||||
assert analytics.is_uuid_in_percentage("ff", 100) is True
|
||||
|
||||
|
||||
# Test invalid inputs
|
||||
with pytest.raises(ValueError):
|
||||
analytics.is_uuid_in_percentage("00", -1)
|
||||
with pytest.raises(ValueError):
|
||||
analytics.is_uuid_in_percentage("00", 101)
|
||||
|
||||
|
||||
# Test empty/None UUID
|
||||
assert analytics.is_uuid_in_percentage("", 50) is False
|
||||
assert analytics.is_uuid_in_percentage(None, 50) is False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue