diff options
| author | Anthony Sottile <asottile@umich.edu> | 2019-01-30 11:00:36 -0800 |
|---|---|---|
| committer | Anthony Sottile <asottile@umich.edu> | 2019-01-30 11:00:36 -0800 |
| commit | 137b45ac2f65b72521505da21bd8fd8c30db0743 (patch) | |
| tree | cfee0f8108aa5b49884fdae63627417082fa3ddb /tests/integration | |
| parent | 941b1208193ec26b7958aa8bf3ad4221fc813e91 (diff) | |
| download | flake8-137b45ac2f65b72521505da21bd8fd8c30db0743.tar.gz | |
Fix legacy api invocation of make_notifier
Diffstat (limited to 'tests/integration')
| -rw-r--r-- | tests/integration/test_api_legacy.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/integration/test_api_legacy.py b/tests/integration/test_api_legacy.py new file mode 100644 index 0000000..0ffaa22 --- /dev/null +++ b/tests/integration/test_api_legacy.py @@ -0,0 +1,13 @@ +"""Integration tests for the legacy api.""" +from flake8.api import legacy + + +def test_legacy_api(tmpdir): + """A basic end-to-end test for the legacy api reporting errors.""" + with tmpdir.as_cwd(): + t_py = tmpdir.join('t.py') + t_py.write('import os # unused import\n') + + style_guide = legacy.get_style_guide() + report = style_guide.check_files([t_py.strpath]) + assert report.total_errors == 1 |
