- 
                Notifications
    
You must be signed in to change notification settings  - Fork 3.5k
 
[ex_unit] Omit excluded tests from test count in CLI summary #14078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
76bff37
              4e7a5b1
              c64c54f
              190afac
              0d75496
              ce56313
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -331,19 +331,19 @@ defmodule ExUnitTest do | |
| 
     | 
||
| {result, output} = run_with_filter([exclude: [even: true]], [ParityTest]) | ||
| assert result == %{failures: 0, skipped: 0, excluded: 1, total: 4} | ||
| assert output =~ "\n4 tests, 0 failures, 1 excluded\n" | ||
| assert output =~ "\n3 tests, 0 failures, 1 excluded\n" | ||
| 
     | 
||
| {result, output} = run_with_filter([exclude: :even], [ParityTest]) | ||
| assert result == %{failures: 0, skipped: 0, excluded: 3, total: 4} | ||
| assert output =~ "\n4 tests, 0 failures, 3 excluded\n" | ||
| assert output =~ "\n1 test, 0 failures, 3 excluded\n" | ||
| 
     | 
||
| {result, output} = run_with_filter([exclude: :even, include: [even: true]], [ParityTest]) | ||
| assert result == %{failures: 1, skipped: 0, excluded: 2, total: 4} | ||
| assert output =~ "\n4 tests, 1 failure, 2 excluded\n" | ||
| assert output =~ "\n2 tests, 1 failure, 2 excluded\n" | ||
| 
     | 
||
| {result, output} = run_with_filter([exclude: :test, include: [even: true]], [ParityTest]) | ||
| assert result == %{failures: 1, skipped: 0, excluded: 3, total: 4} | ||
| assert output =~ "\n4 tests, 1 failure, 3 excluded\n" | ||
| assert output =~ "\n1 test, 1 failure, 3 excluded\n" | ||
| end | ||
| 
     | 
||
| test "log capturing" do | ||
| 
          
            
          
           | 
    @@ -509,15 +509,15 @@ defmodule ExUnitTest do | |
| # Empty because it is already loaded | ||
| {result, output} = run_with_filter([exclude: :module], []) | ||
| assert result == %{failures: 0, skipped: 0, excluded: 2, total: 2} | ||
| assert output =~ "\n2 tests, 0 failures, 2 excluded\n" | ||
| assert output =~ "\n0 tests, 0 failures, 2 excluded\n" | ||
| 
     | 
||
| {result, output} = | ||
| [exclude: :test, include: [module: "ExUnitTest.SecondTestModule"]] | ||
| |> run_with_filter([FirstTestModule, SecondTestModule]) | ||
| 
     | 
||
| assert result == %{failures: 1, skipped: 0, excluded: 1, total: 2} | ||
| assert output =~ "\n 1) test false (ExUnitTest.SecondTestModule)\n" | ||
| assert output =~ "\n2 tests, 1 failure, 1 excluded\n" | ||
| assert output =~ "\n1 test, 1 failure, 1 excluded\n" | ||
| end | ||
| 
     | 
||
| test "raises on reserved tag :file in module" do | ||
| 
          
            
          
           | 
    @@ -680,7 +680,7 @@ defmodule ExUnitTest do | |
| end) | ||
| 
     | 
||
| refute output =~ max_failures_reached_msg() | ||
| assert output =~ "\n6 tests, 0 failures, 1 excluded, 4 invalid, 1 skipped\n" | ||
| assert output =~ "\n5 tests, 0 failures, 1 excluded, 4 invalid, 1 skipped\n" | ||
| end | ||
| 
     | 
||
| test "parameterized tests" do | ||
| 
          
            
          
           | 
    @@ -787,7 +787,7 @@ defmodule ExUnitTest do | |
| end) | ||
| 
     | 
||
| assert output =~ max_failures_reached_msg() | ||
| assert output =~ "\n6 tests, 2 failures, 1 excluded, 1 skipped\n" | ||
| assert output =~ "\n5 tests, 2 failures, 1 excluded, 1 skipped\n" | ||
| end | ||
| 
     | 
||
| test ":max_failures is not reached" do | ||
| 
          
            
          
           | 
    @@ -818,7 +818,7 @@ defmodule ExUnitTest do | |
| end) | ||
| 
     | 
||
| refute output =~ max_failures_reached_msg() | ||
| assert output =~ "\n8 tests, 2 failures, 2 excluded, 1 skipped\n" | ||
| assert output =~ "\n6 tests, 2 failures, 2 excluded, 1 skipped\n" | ||
| end | ||
| 
     | 
||
| test ":max_failures has been reached" do | ||
| 
          
            
          
           | 
    @@ -852,7 +852,7 @@ defmodule ExUnitTest do | |
| end) | ||
| 
     | 
||
| assert output =~ max_failures_reached_msg() | ||
| assert output =~ "\n7 tests, 2 failures, 2 excluded, 2 skipped\n" | ||
| assert output =~ "\n5 tests, 2 failures, 2 excluded, 2 skipped\n" | ||
| end | ||
| 
     | 
||
| # Excluded and skipped tests are detected before setup_all | ||
| 
          
            
          
           | 
    @@ -886,7 +886,7 @@ defmodule ExUnitTest do | |
| end) | ||
| 
     | 
||
| assert output =~ max_failures_reached_msg() | ||
| assert output =~ "\n4 tests, 0 failures, 1 excluded, 2 invalid, 1 skipped\n" | ||
| assert output =~ "\n3 tests, 0 failures, 1 excluded, 2 invalid, 1 skipped\n" | ||
                
       | 
||
| end | ||
| 
     | 
||
| test ":max_failures flushes all async/sync cases" do | ||
| 
          
            
          
           | 
    @@ -1059,7 +1059,7 @@ defmodule ExUnitTest do | |
| end) | ||
| 
     | 
||
| assert output =~ "All tests have been excluded.\n" | ||
| assert output =~ "2 tests, 0 failures, 2 excluded\n" | ||
| assert output =~ "0 tests, 0 failures, 2 excluded\n" | ||
| end | ||
| 
     | 
||
| test "tests are run in compile order (FIFO)" do | ||
| 
          
            
          
           | 
    ||
Uh oh!
There was an error while loading. Please reload this page.