#NEWLINE# def assert_lint( self , package_type , expected_output ) : #NEWLINE# #INDENT# '\n        ``LintPackage.run`` reports only unfiltered errors and raises\n        ``SystemExit``.\n\n        :param PackageTypes package_type: The type of package to test.\n        :param bytes expected_output: The expected output of the linting.\n        ' #NEWLINE# destination_path = FilePath ( self . mktemp ( ) ) #NEWLINE# destination_path . makedirs ( ) #NEWLINE# source_path = FilePath ( self . mktemp ( ) ) #NEWLINE# source_path . makedirs ( ) #NEWLINE# source_path . child ( 'Foo' ) . touch ( ) #NEWLINE# source_path . child ( 'Bar' ) . touch ( ) #NEWLINE# BuildPackage ( package_type = package_type , destination_path = destination_path , source_paths = { #NEWLINE# #INDENT# source_path : FilePath ( '/foo/bar' ) , #NEWLINE# source_path . child ( 'Foo' ) : FilePath ( '/opt/file' ) , #NEWLINE# #UNINDENT# } , name = 'package-name' , prefix = FilePath ( '/' ) , epoch = b'3' , rpm_version = RPMVersion ( version = '0.3' , release = '0.dev.1' ) , license = 'Example' , url = 'https://package.example/' , vendor = 'Acme Corporation' , maintainer = 'Someone <noreply@example.com>' , architecture = 'all' , description = 'Description\n\nExtended' , category = 'none' , dependencies = [ ] ) . run ( ) #NEWLINE# step = LintPackage ( package_type = package_type , destination_path = destination_path , epoch = b'3' , rpm_version = RPMVersion ( version = '0.3' , release = '0.dev.1' ) , package = 'package-name' , architecture = 'all' ) #NEWLINE# step . output = StringIO ( ) #NEWLINE# self . assertRaises ( SystemExit , step . run ) #NEWLINE# self . assertEqual ( step . output . getvalue ( ) , expected_output )