Skip to content

Commit

Permalink
Merge pull request #1775 from Iamshankhadeep/add_test_unwated_log_war…
Browse files Browse the repository at this point in the history
…ning

Add test to check unwanted log messages is not printing to the screen…
  • Loading branch information
pombredanne authored Oct 22, 2019
2 parents 629944e + 5c6f214 commit 25d71f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/scancode/data/unwanted_log_message.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
strstrstrstrstrstrstrstrstrstrstrstrstrstrstrstrstr
strstrstrstrstrstrstrstrstrstrstrstrstrstrstrstrstr
80:\�
81:\�
82:\�
Done:0
6 changes: 6 additions & 0 deletions tests/scancode/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ def test_verbose_option_with_copyrights(monkeypatch):
assert 'copyright_acme_c-c.c' in result.output
assert len(open(result_file).read()) > 10

def test_unwanted_log_warning_message():
test_dir = test_env.get_test_loc('unwanted_log_message.txt')
result_file = test_env.get_temp_file('json')
args = ['-c', '--json-pp', result_file, test_dir]
result = run_scan_click(args)
assert 'No handlers could be found for logger "bs4.dammit"' not in result.output

def test_license_option_detects_licenses():
test_dir = test_env.get_test_loc('license', copy=True)
Expand Down

0 comments on commit 25d71f0

Please sign in to comment.