summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-09-26 11:08:57 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-09-26 20:20:58 +0200
commitfa70623a651d2a0b227202cad1e526e3eeebfa00 (patch)
tree0fdb7195e73f8e26baa155f1651e5303dcb41877
parent7ec2f8a4f26cec3fbbe1fb447058acaf508b39c0 (diff)
downloadgitpython-fa70623a651d2a0b227202cad1e526e3eeebfa00.tar.gz
test, #519: FIX appveyor conda & failures in py2.6 `assertRaisesRegexp`
-rw-r--r--.appveyor.yml13
-rw-r--r--.travis.yml5
-rw-r--r--git/test/test_git.py1
-rw-r--r--git/test/test_index.py10
-rw-r--r--git/test/test_repo.py5
5 files changed, 22 insertions, 12 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 233ea4e3..56669694 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -6,17 +6,19 @@ environment:
PYTHON_VERSION: "2.7"
- PYTHON: "C:\\Miniconda"
PYTHON_VERSION: "2.7"
+ IS_CONDA: "yes"
GIT_PATH: "C:\\cygwin\\bin"
- PYTHON: "C:\\Miniconda3-x64"
PYTHON_VERSION: "3.4"
+ IS_CONDA: "yes"
- PYTHON: "C:\\Python34"
PYTHON_VERSION: "3.4"
GIT_PATH: "C:\\cygwin64\\bin"
- - PYTHON: "C:\Python35-x64"
+ - PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5"
- - PYTHON: "C:\Python35-x64"
+ - PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5"
GIT_PATH: "C:\\cygwin64\\bin"
@@ -28,12 +30,13 @@ install:
- |
uname -a
where git
+ where python pip pip2 pip3 pip34 pip35 pip36
python --version
python -c "import struct; print(struct.calcsize('P') * 8)"
- - IF EXIST "%PYTHON%\conda.exe" (
+ - IF "%IS_CONDA%"=="yes" (
conda info -a &
- conda install --yes --quiet pip
+ conda install --yes --quiet pip
)
- pip install nose wheel coveralls
- IF "%PYTHON_VERSION%"=="2.7" (
@@ -59,7 +62,7 @@ install:
- python setup.py develop
-build: off
+build: false
test_script:
- "nosetests -v"
diff --git a/.travis.yml b/.travis.yml
index 31f2c00c..0214a73b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,7 +32,8 @@ script:
- ulimit -n 96
- ulimit -n
- nosetests -v --with-coverage
- - flake8
- - cd doc && make html
+ - if [ "$TRAVIS_PYTHON_VERSION" != '2.6' ]; then flake8; fi
+ - if [ "$TRAVIS_PYTHON_VERSION" != '2.6' ]; then cd doc && make html; fi
+ -
after_success:
- coveralls
diff --git a/git/test/test_git.py b/git/test/test_git.py
index 82ed2ace..f8318595 100644
--- a/git/test/test_git.py
+++ b/git/test/test_git.py
@@ -239,7 +239,6 @@ class TestGit(TestBase):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=False,
- creationflags=Git.CREATE_NO_WINDOW if sys.platform == 'win32' else 0,
)
handle_process_output(proc, counter_stdout, counter_stderr, lambda proc: proc.wait())
diff --git a/git/test/test_index.py b/git/test/test_index.py
index 178a59d2..2ea787a4 100644
--- a/git/test/test_index.py
+++ b/git/test/test_index.py
@@ -135,7 +135,7 @@ class TestIndex(TestBase):
raise AssertionError("CMP Failed: Missing entries in index: %s, missing in tree: %s" %
(bset - iset, iset - bset))
# END assertion message
-
+
@with_rw_repo('0.1.6')
def test_index_lock_handling(self, rw_repo):
def add_bad_blob():
@@ -147,7 +147,8 @@ class TestIndex(TestBase):
except Exception as ex:
msg_py3 = "required argument is not an integer"
msg_py2 = "cannot convert argument to integer"
- assert msg_py2 in str(ex) or msg_py3 in str(ex)
+ ## msg_py26 ="unsupported operand type(s) for &: 'str' and 'long'"
+ assert msg_py2 in str(ex) or msg_py3 in str(ex), str(ex)
## 2nd time should not fail due to stray lock file
try:
@@ -157,6 +158,9 @@ class TestIndex(TestBase):
@with_rw_repo('0.1.6')
def test_index_file_from_tree(self, rw_repo):
+ if sys.version_info < (2, 7):
+ ## Skipped, not `assertRaisesRegexp` in py2.6
+ return
common_ancestor_sha = "5117c9c8a4d3af19a9958677e45cda9269de1541"
cur_sha = "4b43ca7ff72d5f535134241e7c797ddc9c7a3573"
other_sha = "39f85c4358b7346fee22169da9cad93901ea9eb9"
@@ -576,7 +580,7 @@ class TestIndex(TestBase):
if sys.platform != "win32":
for target in ('/etc/nonexisting', '/etc/passwd', '/etc'):
basename = "my_real_symlink"
-
+
link_file = os.path.join(rw_repo.working_tree_dir, basename)
os.symlink(target, link_file)
entries = index.reset(new_commit).add([link_file], fprogress=self._fprogress_add)
diff --git a/git/test/test_repo.py b/git/test/test_repo.py
index abc4a704..b516402a 100644
--- a/git/test/test_repo.py
+++ b/git/test/test_repo.py
@@ -110,7 +110,7 @@ class TestRepo(TestBase):
# try from invalid revision that does not exist
self.failUnlessRaises(BadName, self.rorepo.tree, 'hello world')
-
+
def test_pickleable(self):
pickle.loads(pickle.dumps(self.rorepo))
@@ -318,6 +318,9 @@ class TestRepo(TestBase):
@patch.object(Git, '_call_process')
def test_should_display_blame_information(self, git):
+ if sys.version_info < (2, 7):
+ ## Skipped, not `assertRaisesRegexp` in py2.6
+ return
git.return_value = fixture('blame')
b = self.rorepo.blame('master', 'lib/git.py')
assert_equal(13, len(b))