@@ -21,7 +21,7 @@ def test_basic_functionality(tmpdir):
2121 with open ("test_dir/file2.txt" , "w" ) as f :
2222 f .write ("Contents of file2" )
2323
24- result = runner .invoke (cli , ["test_dir" ])
24+ result = runner .invoke (cli , ["test_dir" ], catch_exceptions = False )
2525 assert result .exit_code == 0
2626 assert "test_dir/file1.txt" in result .output
2727 assert "Contents of file1" in result .output
@@ -36,7 +36,7 @@ def test_include_hidden(tmpdir):
3636 with open ("test_dir/.hidden.txt" , "w" ) as f :
3737 f .write ("Contents of hidden file" )
3838
39- result = runner .invoke (cli , ["test_dir" ])
39+ result = runner .invoke (cli , ["test_dir" ], catch_exceptions = False )
4040 assert result .exit_code == 0
4141 assert "test_dir/.hidden.txt" not in result .output
4242
@@ -61,11 +61,9 @@ def test_ignore_gitignore(tmpdir):
6161 with open ("test_dir/nested_include/included2.txt" , "w" ) as f :
6262 f .write ("This nested file should be included" )
6363 with open ("test_dir/nested_ignore/.gitignore" , "w" ) as f :
64- f .write ("nested_ignore.txt " )
64+ f .write ("* " )
6565 with open ("test_dir/nested_ignore/nested_ignore.txt" , "w" ) as f :
6666 f .write ("This nested file should not be included" )
67- with open ("test_dir/nested_ignore/actually_include.txt" , "w" ) as f :
68- f .write ("This nested file should actually be included" )
6967
7068 result = runner .invoke (cli , ["test_dir" , "-c" ])
7169 assert result .exit_code == 0
@@ -74,7 +72,6 @@ def test_ignore_gitignore(tmpdir):
7472 assert filenames == {
7573 "test_dir/included.txt" ,
7674 "test_dir/nested_include/included2.txt" ,
77- "test_dir/nested_ignore/actually_include.txt" ,
7875 }
7976
8077 result2 = runner .invoke (cli , ["test_dir" , "-c" , "--ignore-gitignore" ])
@@ -86,7 +83,6 @@ def test_ignore_gitignore(tmpdir):
8683 "test_dir/ignored.txt" ,
8784 "test_dir/nested_include/included2.txt" ,
8885 "test_dir/nested_ignore/nested_ignore.txt" ,
89- "test_dir/nested_ignore/actually_include.txt" ,
9086 }
9187
9288
@@ -243,7 +239,7 @@ def test_binary_file_warning(tmpdir):
243239 with open ("test_dir/text_file.txt" , "w" ) as f :
244240 f .write ("This is a text file" )
245241
246- result = runner .invoke (cli , ["test_dir" ])
242+ result = runner .invoke (cli , ["test_dir" ], catch_exceptions = False )
247243 assert result .exit_code == 0
248244
249245 stdout = result .stdout
@@ -331,7 +327,7 @@ def test_line_numbers(tmpdir):
331327 with open ("test_dir/multiline.txt" , "w" ) as f :
332328 f .write (test_content )
333329
334- result = runner .invoke (cli , ["test_dir" ])
330+ result = runner .invoke (cli , ["test_dir" ], catch_exceptions = False )
335331 assert result .exit_code == 0
336332 assert "1 First line" not in result .output
337333 assert test_content in result .output
0 commit comments