mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	rate_limiter.py now has sufficient test coverage to remove from the list of exclusions. Tweaked by tabbott to handle @abstractmethod in a better way.
		
			
				
	
	
		
			53 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
[report]
 | 
						|
# Regexes for lines to exclude from consideration
 | 
						|
exclude_lines =
 | 
						|
    # Re-enable the standard coverage pragma
 | 
						|
    nocoverage
 | 
						|
    # Don't complain if non-runnable code isn't run:
 | 
						|
    if False:
 | 
						|
    # Don't require coverage for base class NotImplementedErrors
 | 
						|
    raise NotImplementedError()
 | 
						|
    # Don't require coverage for test suite AssertionError -- they're usually for clarity
 | 
						|
    raise AssertionError
 | 
						|
    # Don't require coverage for __str__ statements just used for printing
 | 
						|
    def __str__[(]self[)] -> .*:
 | 
						|
    # Don't require coverage for errors about unsupported webhook event types
 | 
						|
    raise UnexpectedWebhookEventType
 | 
						|
    # Don't require coverage for blocks only run when type-checking
 | 
						|
    if TYPE_CHECKING:
 | 
						|
    # Don't require coverage for abstract methods; they're never called.
 | 
						|
    @abstractmethod
 | 
						|
    # Don't require coverage for the settings.LOG_API_EVENT_TYPES code paths
 | 
						|
    # These are only run in a special testing mode, so will fail normal coverage.
 | 
						|
    if settings.LOG_API_EVENT_TYPES:
 | 
						|
    # PEP 484 overloading syntax
 | 
						|
    ^\s*\.\.\.
 | 
						|
 | 
						|
[run]
 | 
						|
data_file=var/.coverage
 | 
						|
omit =
 | 
						|
    */zulip-venv-cache/*
 | 
						|
    */migrations/*
 | 
						|
    */management/commands/*
 | 
						|
    # Parts of the test runner infrastructure
 | 
						|
    tools/test-backend
 | 
						|
    zerver/lib/test_fixtures.py
 | 
						|
    zerver/lib/test_runner.py
 | 
						|
    # Has its own independent test suite
 | 
						|
    zerver/openapi/python_examples.py
 | 
						|
    zerver/lib/parallel.py
 | 
						|
    # Debugging tools that don't lend themselves well to unit tests
 | 
						|
    zerver/lib/debug.py
 | 
						|
    # Part of provisioning/populate_db
 | 
						|
    zerver/lib/generate_test_data.py
 | 
						|
    # Excluded because its coverage state is flaky.
 | 
						|
    zerver/tornado/ioloop_logging.py
 | 
						|
    # Zulip's library for use in scripts
 | 
						|
    scripts/lib/zulip_tools.py
 | 
						|
    # Used only for the legacy Zephyr integration, and unlikely to ever be unit-tested
 | 
						|
    zerver/lib/ccache.py
 | 
						|
    # Settings.py files are hard to test
 | 
						|
    zproject/*settings.py
 | 
						|
    # https://github.com/davidhalter/jedi/issues/1122
 | 
						|
    blub
 |