Skip to content

Commit

Permalink
Add unit tests for addFileExclude Method
Browse files Browse the repository at this point in the history
  • Loading branch information
ShirshenduR committed Oct 28, 2024
1 parent bbebd4a commit 02e884a
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 02e884a

Please sign in to comment.