Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
Mostly wrong import order, useless imports, etc.
  • Loading branch information
praiskup committed Oct 3, 2024
1 parent 5ad8f00 commit 32bd759
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
4 changes: 2 additions & 2 deletions runtests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/python3
#
# Copyright (c) 2008-2009 Red Hat, Inc.
#
Expand All @@ -19,6 +19,7 @@
import shutil
import sys
import tempfile
import nose

# Make sure we run from the source, this is tricky because the functional
# tests need to find both the location of the 'tito' executable script,
Expand All @@ -34,7 +35,6 @@
os.environ['TITO_SRC_BIN_DIR'] = SRC_BIN_DIR

if __name__ == '__main__':
import nose

print("Using Python %s" % sys.version)
print("Using nose %s" % nose.__version__)
Expand Down
4 changes: 2 additions & 2 deletions test/functional/release_copr_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
Functional Tests for the CoprReleaser.
"""

from unittest import mock

from functional.fixture import TitoGitTestFixture

from unittest import mock
from tito.compat import * # NOQA
from tito.release import CoprReleaser
from unit import Capture

PKG_NAME = "releaseme"

Expand Down
3 changes: 2 additions & 1 deletion test/unit/bugtracker_tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import unittest
from tito.bugtracker import BugzillaExtractor
from unittest.mock import Mock, patch

from tito.bugtracker import BugzillaExtractor


class ExtractBugzillasTest(unittest.TestCase):

Expand Down
22 changes: 12 additions & 10 deletions test/unit/common_tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#
# Copyright (c) 2008-2009 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
Expand All @@ -13,6 +12,18 @@
# in this software or its documentation.

""" Pure unit tests for tito's common module. """

import os
import re
import unittest

from unittest.mock import patch, call
from tempfile import NamedTemporaryFile
from textwrap import dedent
from unit import open_mock, Capture
from blessed import Terminal

# Pure unit tests for tito's common module
from tito.common import (replace_version, find_spec_like_file, increase_version,
search_for, compare_version, run_command_print, find_wrote_in_rpmbuild_output,
render_cheetah, increase_zstream, reset_release, find_file_with_extension,
Expand All @@ -23,15 +34,6 @@
from tito.compat import StringIO
from tito.tagger import CargoBump

import os
import re
import unittest

from unittest.mock import Mock, patch, call
from tempfile import NamedTemporaryFile
from textwrap import dedent
from unit import open_mock, Capture
from blessed import Terminal


class CommonTests(unittest.TestCase):
Expand Down

0 comments on commit 32bd759

Please sign in to comment.