mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 12:12:47 +00:00
pyflakes cleanup
Signed-off-by: Devan Goodwin <dgoodwin@rm-rf.ca>
This commit is contained in:
parent
83aba138ec
commit
515815dcbc
8 changed files with 12 additions and 20 deletions
|
@ -18,9 +18,6 @@ Executes all tests.
|
|||
|
||||
import sys
|
||||
import os
|
||||
import os.path
|
||||
|
||||
import unittest
|
||||
|
||||
# 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,
|
||||
|
|
2
setup.py
2
setup.py
|
@ -16,8 +16,6 @@
|
|||
Tito Setup Script
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
|
||||
|
|
|
@ -19,7 +19,9 @@ import re
|
|||
import sys
|
||||
import commands
|
||||
|
||||
from tito.common import *
|
||||
from tito.common import (debug, run_command, error_out, find_git_root,
|
||||
create_tgz, get_build_commit, find_spec_file, get_script_path,
|
||||
get_git_head_commit, get_relative_project_dir, check_tag_exists)
|
||||
|
||||
DEFAULT_KOJI_OPTS = "build --nowait"
|
||||
DEFAULT_CVS_BUILD_DIR = "cvswork"
|
||||
|
|
|
@ -23,8 +23,6 @@ import ConfigParser
|
|||
|
||||
from optparse import OptionParser
|
||||
|
||||
from tito.builder import Builder, NoTgzBuilder
|
||||
from tito.tagger import VersionTagger, ReleaseTagger
|
||||
from tito.common import DEFAULT_BUILD_DIR
|
||||
from tito.common import (find_git_root, run_command,
|
||||
error_out, debug, get_project_name, get_relative_project_dir,
|
||||
|
|
|
@ -16,7 +16,6 @@ Common operations.
|
|||
|
||||
import os
|
||||
import re
|
||||
import os.path
|
||||
import sys
|
||||
import commands
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ Code for tagging Spacewalk/Satellite packages.
|
|||
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import commands
|
||||
import StringIO
|
||||
import shutil
|
||||
|
@ -26,7 +25,9 @@ import textwrap
|
|||
|
||||
from time import strftime
|
||||
|
||||
from tito.common import *
|
||||
from tito.common import (debug, error_out, run_command, find_git_root,
|
||||
find_spec_file, get_project_name, get_latest_tagged_version,
|
||||
get_script_path, get_spec_version_and_release)
|
||||
|
||||
|
||||
class VersionTagger(object):
|
||||
|
|
|
@ -17,14 +17,11 @@ Functional Tests for Tito's Tagger Module
|
|||
NOTE: These tests require a makeshift git repository created in /tmp.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
import os.path
|
||||
|
||||
import unittest
|
||||
|
||||
import tito.cli # prevents a circular import
|
||||
from tito.common import *
|
||||
from tito.common import check_tag_exists, commands, run_command
|
||||
|
||||
# A location where we can safely create a test git repository.
|
||||
# WARNING: This location will be destroyed if present.
|
||||
|
@ -65,7 +62,7 @@ rm -rf %{buildroot}
|
|||
%changelog
|
||||
"""
|
||||
|
||||
def tito(argstring):
|
||||
def run_tito(argstring):
|
||||
""" Run the tito script from source with given arguments. """
|
||||
tito_path = 'tito' # assume it's on PATH by default
|
||||
if 'TITO_SRC_BIN_DIR' in os.environ:
|
||||
|
@ -117,7 +114,7 @@ class TaggerTests(unittest.TestCase):
|
|||
|
||||
os.chdir(SINGLE_GIT)
|
||||
self.assertFalse(os.path.exists(os.path.join(SINGLE_GIT, "rel-eng")))
|
||||
tito("init")
|
||||
run_tito("init")
|
||||
self.assertTrue(os.path.exists(os.path.join(SINGLE_GIT, "rel-eng")))
|
||||
self.assertTrue(os.path.exists(os.path.join(SINGLE_GIT, "rel-eng",
|
||||
"packages")))
|
||||
|
@ -130,12 +127,12 @@ class TaggerTests(unittest.TestCase):
|
|||
|
||||
def test_initial_tag_keep_version(self):
|
||||
""" Create an initial package tag with --keep-version. """
|
||||
tito("tag --keep-version --accept-auto-changelog --debug")
|
||||
run_tito("tag --keep-version --accept-auto-changelog --debug")
|
||||
check_tag_exists("%s-0.0.1-1" % TEST_PKG_NAME, offline=True)
|
||||
|
||||
def test_initial_tag(self):
|
||||
""" Test creating an initial tag. """
|
||||
tito("tag --accept-auto-changelog --debug")
|
||||
run_tito("tag --accept-auto-changelog --debug")
|
||||
check_tag_exists("%s-0.0.2-1" % TEST_PKG_NAME, offline=True)
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
""" Pure unit tests for tito's common module. """
|
||||
|
||||
from tito.common import *
|
||||
from tito.common import normalize_class_name
|
||||
|
||||
import unittest
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue