Skip to content

Commit

Permalink
Merge pull request Kota-Karthik#161 from ShirshenduR/exclude
Browse files Browse the repository at this point in the history
Fixes Kota-Karthik#15 Add unit tests for addFileExclude Method
  • Loading branch information
Kota-Karthik authored Oct 28, 2024
2 parents 1e361b3 + 02e884a commit c0b7d37
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_fileFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,15 @@ def test_set_max_file_size_empty_value():
file_filter.setMaxFileSize("")
assert file_filter.maxFileSize == "", "Failed to set max file size to empty value"

def test_add_file_exclude_adds_file():
file_filter = FileFilter()
file_filter.addFileExclude("test_file.txt")
assert "test_file.txt" in file_filter.fileExclude

def test_add_file_exclude_prevents_duplicates():
file_filter = FileFilter()
file_filter.addFileExclude("test_file.txt")
file_filter.addFileExclude("test_file.txt")
assert file_filter.fileExclude.count("test_file.txt") == 2


0 comments on commit c0b7d37

Please sign in to comment.