# This is a combination of 7 commits.
# The first commit's message is:
Add a known_warning decorator and suppress warnings in color pkg

# This is the 2nd commit message:

Use the existing all_warnings context manager

# This is the 3rd commit message:

Raise warnings in data

# This is the 4th commit message:

Raise warnings in draw

# This is the 5th commit message:

Raise warnings in exposure

# This is the 6th commit message:

Suppress warnings in exposure tests

# This is the 7th commit message:

Add comments about warning suppressions
Handle warnings in several packages

Start handling warnings in data, exposure, and draw

Add a known_warning decorator and suppress warnings in color pkg

Use the existing all_warnings context manager

Raise warnings in data

Raise warnings in draw

Raise warnings in exposure

Suppress warnings in exposure tests

Add comments about warning suppressions

Raise warnings in feature

Fix warnings in filter package

Add warning handling to graph

Handle warnings in io package
Handle more warnings and reset io plugins as needed

Reset plugins prior to running collections test

Handle warnings in morphology pkg

Add __init__ for morpohology tests

Handle warnings for novice pkg

Handle warnings for restoration pkg

Handle warnings for segmentation pkg

Handle warnings for _shared pkg

Handle warnings for transform pkg

Handle warnings for util pkg

Handle warnings in viewer module
Accommodate upcoming changes to RectangleSelector API
Clean up PIL plugin and handle more warnings

Use the pil plugin to load data files

Fix install_requires string formatting

Dead end commit

Make all tools executable

Remove debug print

Suppress PIL resourcewarnings

Handle a few more warnings
Fix some doctest warnings

Fix doctest errors

Suppress warnings when importing scipy.ndimage for the first time
Import scipy before turning on warnings
Add a test setup helper function

Add a function to set up a skimage test

Switch to new test helper function

Import local packages that raise warnings in test setup function

More fixes to doctests

Fix regionprops doc test

Try and fix the test_rank failure.

Remove no longer needed RectangleSelector shim

Skip more doctests in _regionprops

Try importing another scipy subpackage
More doctest and pil_plugin fixes

Fix Python2 imread in pil_plugin.

Load from data

Use all_warnings when importing the other packages

More fixes for regionprops doctest
Handle more warnings

Punt on the issue of warnings with the minimum build

Handle warnings in measure pkg

Fix the rank filter test by forcing a random seed in the function

Compare as boolean in imread test

Import loadmat in test_setup to avoid warning

Use a setup method for imread plugin test

Revoke unintended changes

Fix indentation to appease jni

More indentation fixes

Fix unintentional comment out
Create new expected_warnings helper and some cleanup

Add new helper function for expected warnings during test

Indentation cleanups and avoid skipping doctests if possible.
More cleanup and updating of tests

Clean up setup_test and add a teardown_test method

Implement new setup/teardown in novice tests

Fix warning handling in pil_plugin

Update rank tests
Add a random seed to the setup
Fix handling of multiple warnings and update tests

Fix handling of multiple warnings

Update all test __init__ files

Update segmentation pkg

Update the color pkg

Update the exposure pkg

Update the filters pkg

Update the io pkg

Update the measure pkg

Update morphology package

Restructure test setup function

Add expected_warnings to __all__

Update restoration pkg.

Remove explicit filter check since it is done elsewhere

Fix the image test helpers

Update the transform pkg

Fix util pkg

Update viewer pkg
Allow for no exceptions to be raised and cleanup

Allow for no exceptions to be raised

Add some helpful comments

Remove doctest skips

Remove TODO note

Cleanup and skip failing doctest
Fix label wrapper function
Change default neighbors to None
Import scipy.sparse in setup_test
Allow warnings in the minimum build
Fix Py2.7 build errors