File: test_code_format.py

package info (click to toggle)
ros-bloom 0.13.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,212 kB
  • sloc: python: 8,113; makefile: 322; xml: 19
file content (12 lines) | stat: -rw-r--r-- 422 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
import pep8
import os


def test_pep8_conformance():
    """Test source code for PEP8 conformance"""
    pep8style = pep8.StyleGuide(max_line_length=120)
    report = pep8style.options.report
    report.start()
    pep8style.input_dir(os.path.join(os.path.dirname(__file__), '..', 'bloom'))
    report.stop()
    assert report.total_errors == 0, "Found '{0}' code style errors (and warnings).".format(report.total_errors)