File: test_E101.py

package info (click to toggle)
pycodestyle 2.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 632 kB
  • sloc: python: 4,743; makefile: 135; sh: 12
file content (18 lines) | stat: -rw-r--r-- 574 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""moved from data files due to 3.12 making this a TokenError"""
import sys
import unittest

from testing.support import errors_from_src


class E101Test(unittest.TestCase):
    def test_E101(self):
        errors = errors_from_src(
            'if True:\n'
            '\tprint(1)  # tabs\n'
            '        print(2)  # spaces\n'
        )
        if sys.version_info >= (3, 12):  # pragma: >=3.12 cover
            self.assertEqual(errors, ['W191:2:1', 'E901:3:28'])
        else:  # pragma: <3.12 cover
            self.assertEqual(errors, ['W191:2:1', 'E101:3:1'])