boilerplate_test: fix bad indentation

This commit is contained in:
Ed Bartosh 2024-01-24 10:36:52 +02:00
parent a1ffdedf78
commit 9dc1da1e5b

View File

@ -20,33 +20,33 @@ from io import StringIO
import os
import sys
class TestBoilerplate(unittest.TestCase):
"""
Note: run this test from the hack/boilerplate directory.
"""
Note: run this test from the hack/boilerplate directory.
$ python -m unittest boilerplate_test
"""
$ python -m unittest boilerplate_test
"""
def test_boilerplate(self):
os.chdir("test/")
def test_boilerplate(self):
os.chdir("test/")
class Args(object):
def __init__(self):
self.filenames = []
self.rootdir = "."
self.boilerplate_dir = "../"
self.verbose = True
class Args(object):
def __init__(self):
self.filenames = []
self.rootdir = "."
self.boilerplate_dir = "../"
self.verbose = True
# capture stdout
old_stdout = sys.stdout
sys.stdout = StringIO.StringIO()
# capture stdout
old_stdout = sys.stdout
sys.stdout = StringIO.StringIO()
boilerplate.args = Args()
ret = boilerplate.main()
boilerplate.args = Args()
ret = boilerplate.main()
output = sorted(sys.stdout.getvalue().split())
output = sorted(sys.stdout.getvalue().split())
sys.stdout = old_stdout
sys.stdout = old_stdout
self.assertEqual(
output, ['././fail.go', '././fail.py'])
self.assertEqual(output, ["././fail.go", "././fail.py"])