Skip to content

Commit 68ce070

Browse files
committed
Remove --unshallow fetch from travis-ci config
1 parent 3e507bf commit 68ce070

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ matrix:
1616
install: pip install coveralls tox
1717
script: tox
1818
before_install:
19-
# Our tests inspect some of *our* git history
20-
- git fetch --unshallow
2119
- git --version
2220
- |
2321
if [ "$LATEST_GIT" = "1" ]; then

tests/git_test.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,18 @@ def test_parse_merge_msg_for_conflicts(input, expected_output):
165165
assert ret == expected_output
166166

167167

168-
def test_get_changed_files():
169-
files = git.get_changed_files(
170-
'78c682a1d13ba20e7cb735313b9314a74365cd3a',
171-
'3387edbb1288a580b37fe25225aa0b856b18ad1a',
172-
)
173-
assert files == ['CHANGELOG.md', 'setup.py']
168+
def test_get_changed_files(in_tmpdir):
169+
cmd_output('git', 'init', '.')
170+
cmd_output('git', 'commit', '--allow-empty', '-m', 'initial commit')
171+
open('a.txt', 'a').close()
172+
open('b.txt', 'a').close()
173+
cmd_output('git', 'add', '.')
174+
cmd_output('git', 'commit', '-m', 'add some files')
175+
files = git.get_changed_files('HEAD', 'HEAD^')
176+
assert files == ['a.txt', 'b.txt']
174177

175178
# files changed in source but not in origin should not be returned
176-
files = git.get_changed_files('HEAD~10', 'HEAD')
179+
files = git.get_changed_files('HEAD^', 'HEAD')
177180
assert files == []
178181

179182

0 commit comments

Comments
 (0)