Skip to content

Commit

Permalink
Respect max-line-length=79 to pass PEP8 check
Browse files Browse the repository at this point in the history
  • Loading branch information
agustinhenze committed Mar 14, 2018
1 parent 8a9dfa9 commit 8693e8f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 32 deletions.
21 changes: 11 additions & 10 deletions tests/misc.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
"""
Miscellaneous for tests.
"""
# Copyright (c) 2018 Red Hat, Inc. All rights reserved. This copyrighted material
# is made available to anyone wishing to use, modify, copy, or
# redistribute it subject to the terms and conditions of the GNU General
# Public License v.2 or later.
# Copyright (c) 2018 Red Hat, Inc. All rights reserved. This copyrighted
# material is made available to anyone wishing to use, modify, copy, or
# redistribute it subject to the terms and conditions of the GNU General Public
# License v.2 or later.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import os


Expand Down
21 changes: 11 additions & 10 deletions tests/test_publisher.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
"""
Test cases for publisher module.
"""
# Copyright (c) 2018 Red Hat, Inc. All rights reserved. This copyrighted material
# is made available to anyone wishing to use, modify, copy, or
# redistribute it subject to the terms and conditions of the GNU General
# Public License v.2 or later.
# Copyright (c) 2018 Red Hat, Inc. All rights reserved. This copyrighted
# material is made available to anyone wishing to use, modify, copy, or
# redistribute it subject to the terms and conditions of the GNU General Public
# License v.2 or later.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest
from skt import publisher

Expand Down
29 changes: 17 additions & 12 deletions tests/test_reporter.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
"""
Test cases for reporter module.
"""
# Copyright (c) 2018 Red Hat, Inc. All rights reserved. This copyrighted material
# is made available to anyone wishing to use, modify, copy, or
# redistribute it subject to the terms and conditions of the GNU General
# Public License v.2 or later.
# Copyright (c) 2018 Red Hat, Inc. All rights reserved. This copyrighted
# material is made available to anyone wishing to use, modify, copy, or
# redistribute it subject to the terms and conditions of the GNU General Public
# License v.2 or later.
#
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import unittest
from contextlib import contextmanager
import re
Expand All @@ -34,6 +35,7 @@ def request_get_mocked(filename):
filename: Asset's filename.
"""
get_mocked = mock.Mock()

def remove_nt_marker(line):
"""Filter function for removing the 'nt ' markers on assets"""
return not re.match(r'^nt ', line)
Expand Down Expand Up @@ -65,7 +67,9 @@ def get_expected_traces(filename):
return expected_traces

def test_kernel_version_unmatch(self):
"""Check it doesn't catch any trace when kernel version doesn't match"""
"""Check it doesn't catch any trace when kernel version doesn't
match.
"""
consolelog = reporter.consolelog('4-4', 'someurl')
with self.request_get_mocked('x86_one_trace.txt'):
traces = consolelog.gettraces()
Expand All @@ -77,7 +81,8 @@ def test_match_one_trace(self):
with self.request_get_mocked('x86_one_trace.txt'):
traces = consolelog.gettraces()
self.assertEqual(len(traces), 1)
expected_trace = self.get_expected_traces('x86_one_trace.txt')[0] + '\n'
expected_trace = self.get_expected_traces('x86_one_trace.txt')[0]
expected_trace += '\n'
self.assertEqual(expected_trace, traces[0])

def test_match_three_traces(self):
Expand Down

0 comments on commit 8693e8f

Please sign in to comment.