aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-09-09 19:56:38 +0200
committerGuido Günther <agx@sigxcpu.org>2016-09-12 08:52:14 +0200
commit6bc1b38edbb21f1e10bb105012b5c3c92753e4f0 (patch)
treef896d6197b3a3ff9e1fa2b60d71115eb30523032
parent9abd425f933c55039d04305003df197b00f0af09 (diff)
07_test_fastimport: flake8 clean
-rw-r--r--tests/07_test_fastimport.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/07_test_fastimport.py b/tests/07_test_fastimport.py
index dcd63f9f..2c52a81b 100644
--- a/tests/07_test_fastimport.py
+++ b/tests/07_test_fastimport.py
@@ -14,21 +14,25 @@ fastimport = None
tf_name = 'testfile'
tl_name = 'a_testlink'
+
def setup():
global repo
tmpdir = context.new_tmpdir(__name__)
repo = gbp.git.GitRepository.create(tmpdir.join('test_repo'))
+
def teardown():
context.teardown()
+
def test_init_fastimport():
"""Create a fastimport object"""
global fastimport
fastimport = gbp.git.FastImport(repo)
assert fastimport, "Failed to init FastImport"
+
def test_add_file():
"""Add a file via fastimport"""
author = repo.get_author_info()
@@ -39,15 +43,18 @@ def test_add_file():
open(testfile),
os.path.getsize(testfile))
+
def test_add_symlink():
"""Add a symbolic link via fastimport"""
author = repo.get_author_info()
fastimport.start_commit('master', author, "a 2nd commit")
fastimport.add_symlink(tl_name, tf_name)
+
def test_close():
fastimport.close()
+
def test_result():
repo.force_head('master', hard=True)
@@ -57,4 +64,3 @@ def test_result():
assert os.path.exists(testfile), "%s doesn't exist" % testfile
assert os.path.lexists(testlink), "%s doesn't exist" % testlink
assert os.readlink(testlink) == tf_name
-