Skip to content

Commit 4a6389e

Browse files
committed
Move tests into PyGitUp package
See #51
1 parent ebf4832 commit 4a6389e

34 files changed

+129
-191
lines changed

.gitignore

+1-4
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,5 @@ nosetests.xml
3434
.project
3535
.pydevproject
3636

37-
# Test repos
38-
tests/*/
39-
4037
# PyCharm
41-
.idea/
38+
.idea/

PyGitUp/gitup.py

-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ def rebase_all_branches(self):
246246
if target.name.startswith('./'):
247247
# Check, if local branch exists
248248
self.git.rev_parse(target.name[2:])
249-
250249
else:
251250
# Check, if remote branch exists
252251
_ = target.commit
File renamed without changes.

tests/test_ahead_of_upstream.py PyGitUp/tests/test_ahead_of_upstream.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from tests import basepath, write_file, init_master
8+
from PyGitUp.tests import basepath, write_file, init_master
119

1210
test_name = 'ahead-of-upstream'
1311
testfile_name = 'file'

tests/test_bundler.py PyGitUp/tests/test_bundler.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@
44
import subprocess
55
from os.path import join
66

7-
import six
8-
9-
# 3rd party libs
10-
from nose.plugins.skip import SkipTest
117
from git import *
8+
from nose.plugins.skip import SkipTest
129

13-
# PyGitup imports
14-
from tests import basepath, write_file, init_master
10+
from PyGitUp.tests import basepath, write_file, init_master
1511

1612
test_name = 'bundler'
1713
repo_path = join(basepath, test_name + os.sep)

tests/test_detached.py PyGitUp/tests/test_detached.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from tests import basepath, init_master, update_file
118
from PyGitUp.git_wrapper import GitError
9+
from PyGitUp.tests import basepath, init_master, update_file
1210

1311
test_name = 'detached'
1412
repo_path = join(basepath, test_name + os.sep)

tests/test_diverged.py PyGitUp/tests/test_diverged.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from tests import basepath, init_master, update_file
8+
from PyGitUp.tests import basepath, init_master, update_file
119

1210
test_name = 'diverged'
1311
repo_path = join(basepath, test_name + os.sep)

tests/test_fast_forwarded.py PyGitUp/tests/test_fast_forwarded.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from tests import basepath, init_master, update_file
8+
from PyGitUp.tests import basepath, init_master, update_file
119

1210
test_name = 'fast-forwarded'
1311
repo_path = join(basepath, test_name + os.sep)

tests/test_fetch_fail.py PyGitUp/tests/test_fetch_fail.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
108
from PyGitUp.git_wrapper import GitError
11-
from tests import basepath, init_master, update_file
9+
from PyGitUp.tests import basepath, init_master, update_file
1210

1311
test_name = 'test-fail'
1412
repo_path = join(basepath, test_name + os.sep)

tests/test_fetchall.py PyGitUp/tests/test_fetchall.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from tests import basepath, init_master, capture
8+
from PyGitUp.tests import basepath, init_master, capture
119

1210
test_name = 'fetch-all'
1311
repo_path = join(basepath, test_name + os.sep)

tests/test_git_not_in_path.py PyGitUp/tests/test_git_not_in_path.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
65
from nose.tools import *
76

8-
# PyGitup imports
9-
from tests import basepath
107
from PyGitUp.git_wrapper import GitError
8+
from PyGitUp.tests import basepath
119

1210
test_name = 'git-not-in-path'
1311
repo_path = join(basepath, test_name + os.sep)

tests/test_local_tracking.py PyGitUp/tests/test_local_tracking.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
65
from nose.tools import *
76

8-
# PyGitup imports
9-
from tests import basepath, init_master, update_file
7+
from PyGitUp.tests import basepath, init_master, update_file
108

119
test_name = 'local_tracking'
1210
repo_path = join(basepath, test_name + os.sep)

tests/test_log_hook.py PyGitUp/tests/test_log_hook.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
import platform
44
from os.path import join
55

6-
# 3rd party libs
7-
from nose.tools import *
86
from git import *
7+
from nose.tools import *
98

10-
# PyGitup imports
11-
from tests import basepath, init_master, update_file
9+
from PyGitUp.tests import basepath, init_master, update_file
1210

1311
test_name = 'log-hook'
1412
repo_path = join(basepath, test_name + os.sep)

tests/test_multiple_remotes.py PyGitUp/tests/test_multiple_remotes.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from tests import basepath, init_master, update_file
8+
from PyGitUp.tests import basepath, init_master, update_file
119

1210
test_name = 'multiple-remotes'
1311
repo_path = join(basepath, test_name + os.sep)

tests/test_no_remotes.py PyGitUp/tests/test_no_remotes.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# System imports
22
import os
33

4-
# 3rd party libs
54
from nose.tools import *
65

7-
# PyGitup imports
8-
from tests import init_master
96
from PyGitUp.git_wrapper import GitError
7+
from PyGitUp.tests import init_master
108

119
test_name = 'no_remotes'
1210

tests/test_nofetch.py PyGitUp/tests/test_nofetch.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from tests import basepath, capture, update_file, init_master
8+
from PyGitUp.tests import basepath, capture, update_file, init_master
119

1210
test_name = 'no-fetch'
1311
new_branch_name = test_name + '.2'

tests/test_not_on_a_git_repo.py PyGitUp/tests/test_not_on_a_git_repo.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
65
from nose.tools import *
76

8-
# PyGitup imports
9-
from tests import basepath
107
from PyGitUp.git_wrapper import GitError
8+
from PyGitUp.tests import basepath
119

1210
test_name = 'not-on-a-repo'
1311
repo_path = join(basepath, test_name + os.sep)

tests/test_out_of_tree.py PyGitUp/tests/test_out_of_tree.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from tests import basepath, write_file, init_master
8+
from PyGitUp.tests import basepath, write_file, init_master
119

1210
test_name = 'out-of-tree'
1311
testfile_name = 'file'

tests/test_overwrite_untracked_error.py PyGitUp/tests/test_overwrite_untracked_error.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
108
from PyGitUp.git_wrapper import RebaseError
11-
from tests import basepath, init_master, update_file, write_file
9+
from PyGitUp.tests import basepath, init_master, update_file, write_file
1210

1311
test_name = 'overwrite_untracked_error'
1412
repo_path = join(basepath, test_name + os.sep)

tests/test_rebase_arguments.py PyGitUp/tests/test_rebase_arguments.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from tests import basepath, write_file, init_master, update_file, testfile_name
118
from PyGitUp.git_wrapper import RebaseError
9+
from PyGitUp.tests import basepath, write_file, init_master, update_file, testfile_name
1210

1311
test_name = 'rebase-arguments'
1412
repo_path = join(basepath, test_name + os.sep)

tests/test_rebase_error.py PyGitUp/tests/test_rebase_error.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from PyGitUp.git_wrapper import GitError, RebaseError
11-
from tests import basepath, write_file, init_master, update_file, testfile_name
8+
from PyGitUp.git_wrapper import RebaseError
9+
from PyGitUp.tests import basepath, write_file, init_master, update_file, testfile_name
1210

1311
test_name = 'rebase_error'
1412
repo_path = join(basepath, test_name + os.sep)

tests/test_rebasing.py PyGitUp/tests/test_rebasing.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from tests import basepath, write_file, init_master, update_file, testfile_name
8+
from PyGitUp.tests import basepath, write_file, init_master, update_file, testfile_name
119

1210
test_name = 'rebasing'
1311
repo_path = join(basepath, test_name + os.sep)

tests/test_remote_branch_deleted.py PyGitUp/tests/test_remote_branch_deleted.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from tests import basepath, init_master
8+
from PyGitUp.tests import basepath, init_master
119

1210
test_name = 'remote-branch-deleted'
1311
new_branch_name = test_name + '.2'

tests/test_returning_to_branch.py PyGitUp/tests/test_returning_to_branch.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from tests import basepath, init_master, update_file
8+
from PyGitUp.tests import basepath, init_master, update_file
119

1210
test_name = 'returning-to-branch'
1311
new_branch_name = test_name + '.2'

tests/test_stash_error.py PyGitUp/tests/test_stash_error.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22
import os
33
from os.path import join
44

5-
# 3rd party libs
6-
from nose.tools import *
75
from git import *
6+
from nose.tools import *
87

9-
# PyGitup imports
10-
from PyGitUp.git_wrapper import GitError, StashError
11-
from tests import basepath, write_file, init_master, testfile_name
8+
from PyGitUp.git_wrapper import StashError
9+
from PyGitUp.tests import basepath, write_file, init_master, testfile_name
1210

1311
test_name = 'stash_error'
1412
repo_path = join(basepath, test_name + os.sep)

0 commit comments

Comments
 (0)