mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 12:12:47 +00:00
Fix linter errors
Mostly wrong import order, useless imports, etc.
This commit is contained in:
parent
cf1524495d
commit
f39b3d620d
4 changed files with 18 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/python3
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008-2009 Red Hat, Inc.
|
# Copyright (c) 2008-2009 Red Hat, Inc.
|
||||||
#
|
#
|
||||||
|
@ -19,6 +19,7 @@ import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import nose
|
||||||
|
|
||||||
# Make sure we run from the source, this is tricky because the functional
|
# 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,
|
# tests need to find both the location of the 'tito' executable script,
|
||||||
|
@ -34,7 +35,6 @@ SRC_BIN_DIR = os.path.abspath(os.path.join(TEST_SCRIPT_DIR, "bin/"))
|
||||||
os.environ['TITO_SRC_BIN_DIR'] = SRC_BIN_DIR
|
os.environ['TITO_SRC_BIN_DIR'] = SRC_BIN_DIR
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import nose
|
|
||||||
|
|
||||||
print("Using Python %s" % sys.version)
|
print("Using Python %s" % sys.version)
|
||||||
print("Using nose %s" % nose.__version__)
|
print("Using nose %s" % nose.__version__)
|
||||||
|
|
|
@ -15,12 +15,12 @@
|
||||||
Functional Tests for the CoprReleaser.
|
Functional Tests for the CoprReleaser.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from functional.fixture import TitoGitTestFixture
|
from functional.fixture import TitoGitTestFixture
|
||||||
|
|
||||||
from unittest import mock
|
|
||||||
from tito.compat import * # NOQA
|
from tito.compat import * # NOQA
|
||||||
from tito.release import CoprReleaser
|
from tito.release import CoprReleaser
|
||||||
from unit import Capture
|
|
||||||
|
|
||||||
PKG_NAME = "releaseme"
|
PKG_NAME = "releaseme"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import unittest
|
import unittest
|
||||||
from tito.bugtracker import BugzillaExtractor
|
|
||||||
from unittest.mock import Mock, patch
|
from unittest.mock import Mock, patch
|
||||||
|
|
||||||
|
from tito.bugtracker import BugzillaExtractor
|
||||||
|
|
||||||
|
|
||||||
class ExtractBugzillasTest(unittest.TestCase):
|
class ExtractBugzillasTest(unittest.TestCase):
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#
|
|
||||||
# Copyright (c) 2008-2009 Red Hat, Inc.
|
# Copyright (c) 2008-2009 Red Hat, Inc.
|
||||||
#
|
#
|
||||||
# This software is licensed to you under the GNU General Public License,
|
# This software is licensed to you under the GNU General Public License,
|
||||||
|
@ -13,6 +12,18 @@
|
||||||
# in this software or its documentation.
|
# in this software or its documentation.
|
||||||
|
|
||||||
""" Pure unit tests for tito's common module. """
|
""" 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,
|
from tito.common import (replace_version, find_spec_like_file, increase_version,
|
||||||
search_for, compare_version, run_command_print, find_wrote_in_rpmbuild_output,
|
search_for, compare_version, run_command_print, find_wrote_in_rpmbuild_output,
|
||||||
render_cheetah, increase_zstream, reset_release, find_file_with_extension,
|
render_cheetah, increase_zstream, reset_release, find_file_with_extension,
|
||||||
|
@ -23,15 +34,6 @@ from tito.common import (replace_version, find_spec_like_file, increase_version,
|
||||||
from tito.compat import StringIO
|
from tito.compat import StringIO
|
||||||
from tito.tagger import CargoBump
|
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):
|
class CommonTests(unittest.TestCase):
|
||||||
|
|
Loading…
Add table
Reference in a new issue