Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitde320f3

Browse files
committed
tesr,#519: FIX appveyor cnda & failures in py2.6assertRaisesRegexp
1 parentb3aaf7b commitde320f3

File tree

5 files changed

+23
-8
lines changed

5 files changed

+23
-8
lines changed

‎.appveyor.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ environment:
66
PYTHON_VERSION:"2.7"
77
-PYTHON:"C:\\Miniconda"
88
PYTHON_VERSION:"2.7"
9+
IS_CONDA:"yes"
910
GIT_PATH:"C:\\cygwin\\bin"
1011

1112
-PYTHON:"C:\\Miniconda3-x64"
1213
PYTHON_VERSION:"3.4"
14+
IS_CONDA:"yes"
1315
-PYTHON:"C:\\Python34"
1416
PYTHON_VERSION:"3.4"
1517
GIT_PATH:"C:\\cygwin64\\bin"
@@ -31,9 +33,9 @@ install:
3133
python --version
3234
python -c "import struct; print(struct.calcsize('P') * 8)"
3335
34-
-IFEXIST "%PYTHON%\conda.exe" (
36+
-IF"%IS_CONDA%"=="yes" (
3537
conda info -a &
36-
conda install --yes --quiet pip
38+
conda install --yes --quietpip
3739
)
3840
-pip install nose wheel coveralls
3941
-IF "%PYTHON_VERSION%"=="2.7" (

‎.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ script:
3232
-ulimit -n 96
3333
-ulimit -n
3434
-nosetests -v --with-coverage
35-
-flake8
36-
-cd doc && make html
35+
-if [ "$TRAVIS_PYTHON_VERSION" != '2.6' ]; then flake8 fi
36+
-if [ "$TRAVIS_PYTHON_VERSION" != '2.6' ]; then cd doc && make html fi
37+
-
3738
after_success:
3839
-coveralls

‎git/test/test_git.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,18 @@ def counter_stdout(line):
234234
defcounter_stderr(line):
235235
count[2]+=1
236236

237+
fromsubprocessimportSTARTUPINFO,STARTF_USESHOWWINDOW,SW_HIDE
238+
si=STARTUPINFO()
239+
si.dwFlags=STARTF_USESHOWWINDOW
240+
si.wShowWindow=SW_HIDE
237241
proc=subprocess.Popen([sys.executable,fixture_path('cat_file.py'),str(fixture_path('issue-301_stderr'))],
238242
stdin=None,
239243
stdout=subprocess.PIPE,
240244
stderr=subprocess.PIPE,
241245
shell=False,
242-
creationflags=Git.CREATE_NO_WINDOWifsys.platform=='win32'else0,
246+
universal_newlines=True,
247+
# creationflags=Git.CREATE_NO_WINDOW if sys.platform == 'win32' else 0,
248+
# startupinfo=si
243249
)
244250

245251
handle_process_output(proc,counter_stdout,counter_stderr,lambdaproc:proc.wait())

‎git/test/test_index.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def _cmp_tree_index(self, tree, index):
135135
raiseAssertionError("CMP Failed: Missing entries in index: %s, missing in tree: %s"%
136136
(bset-iset,iset-bset))
137137
# END assertion message
138-
138+
139139
@with_rw_repo('0.1.6')
140140
deftest_index_lock_handling(self,rw_repo):
141141
defadd_bad_blob():
@@ -157,6 +157,9 @@ def add_bad_blob():
157157

158158
@with_rw_repo('0.1.6')
159159
deftest_index_file_from_tree(self,rw_repo):
160+
ifsys.version_info< (2,7):
161+
## Skipped, not `assertRaisesRegexp` in py2.6
162+
return
160163
common_ancestor_sha="5117c9c8a4d3af19a9958677e45cda9269de1541"
161164
cur_sha="4b43ca7ff72d5f535134241e7c797ddc9c7a3573"
162165
other_sha="39f85c4358b7346fee22169da9cad93901ea9eb9"
@@ -576,7 +579,7 @@ def mixed_iterator():
576579
ifsys.platform!="win32":
577580
fortargetin ('/etc/nonexisting','/etc/passwd','/etc'):
578581
basename="my_real_symlink"
579-
582+
580583
link_file=os.path.join(rw_repo.working_tree_dir,basename)
581584
os.symlink(target,link_file)
582585
entries=index.reset(new_commit).add([link_file],fprogress=self._fprogress_add)

‎git/test/test_repo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def test_tree_from_revision(self):
106106

107107
# try from invalid revision that does not exist
108108
self.failUnlessRaises(BadName,self.rorepo.tree,'hello world')
109-
109+
110110
deftest_pickleable(self):
111111
pickle.loads(pickle.dumps(self.rorepo))
112112

@@ -314,6 +314,9 @@ def test_archive(self):
314314

315315
@patch.object(Git,'_call_process')
316316
deftest_should_display_blame_information(self,git):
317+
ifsys.version_info< (2,7):
318+
## Skipped, not `assertRaisesRegexp` in py2.6
319+
return
317320
git.return_value=fixture('blame')
318321
b=self.rorepo.blame('master','lib/git.py')
319322
assert_equal(13,len(b))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp