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

Commit74c7ed0

Browse files
committed
FIX#526: Do not depend on test-sources
+ Move `HIDE_WINDOWS_KNOWN_ERRORS` flag from`git.test.lib.helper-->git.util`; regular modules in main-sources folder also depend on that flag.+ Use unittest.SkipTest instead of from non-standard `nose` lib.
1 parent4e5ef73 commit74c7ed0

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

‎git/objects/submodule/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
importlogging
4040
importuuid
4141
fromunittest.caseimportSkipTest
42-
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
42+
fromgit.utilimportHIDE_WINDOWS_KNOWN_ERRORS
4343
fromgit.objects.baseimportIndexObject,Object
4444

4545
__all__= ["Submodule","UpdateProgress"]

‎git/test/lib/helper.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@
3131

3232
log=logging.getLogger('git.util')
3333

34-
#: We need an easy way to see if Appveyor TCs start failing,
35-
#: so the errors marked with this var are considered "acknowledged" ones, awaiting remedy,
36-
#: till then, we wish to hide them.
37-
HIDE_WINDOWS_KNOWN_ERRORS=is_winandos.environ.get('HIDE_WINDOWS_KNOWN_ERRORS',True)
38-
3934
#{ Routines
4035

4136

@@ -289,7 +284,7 @@ def remote_repo_creator(self):
289284
You can also run the daemon on a different port by passing --port=<port>"
290285
and setting the environment variable GIT_PYTHON_TEST_GIT_DAEMON_PORT to <port>
291286
"""%temp_dir)
292-
fromnoseimportSkipTest
287+
fromunittestimportSkipTest
293288
raiseSkipTest(msg)ifis_winelseAssertionError(msg)
294289
# END make assertion
295290
# END catch ls remote error

‎git/test/performance/test_odb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
fromunittest.caseimportskipIf
77

88
fromgit.compatimportPY3
9-
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
9+
fromgit.utilimportHIDE_WINDOWS_KNOWN_ERRORS
1010

1111
from .libimport (
1212
TestBigRepoR

‎git/test/test_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def test_add_unicode(self, rw_repo):
128128
try:
129129
file_path.encode(sys.getfilesystemencoding())
130130
exceptUnicodeEncodeError:
131-
fromnoseimportSkipTest
131+
fromunittestimportSkipTest
132132
raiseSkipTest("Environment doesn't support unicode filenames")
133133

134134
withopen(file_path,"wb")asfp:

‎git/test/test_index.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
fixture,
4444
with_rw_repo
4545
)
46-
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
46+
fromgit.utilimportHIDE_WINDOWS_KNOWN_ERRORS
4747
fromgit.test.libimportwith_rw_directory
4848
fromgit.utilimportActor,rmtree
4949
fromgitdb.baseimportIStream

‎git/test/test_repo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050
assert_true,
5151
raises
5252
)
53-
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
53+
fromgit.utilimportHIDE_WINDOWS_KNOWN_ERRORS
5454
fromgit.test.libimportwith_rw_directory
5555
fromgit.utilimportjoin_path_native,rmtree,rmfile
5656
fromgitdb.utilimportbin_to_hex
57-
fromnoseimportSkipTest
57+
fromunittestimportSkipTest
5858

5959
importfunctoolsasfnt
6060
importos.pathasosp

‎git/test/test_submodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
with_rw_repo
2222
)
2323
fromgit.test.libimportwith_rw_directory
24-
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
24+
fromgit.utilimportHIDE_WINDOWS_KNOWN_ERRORS
2525
fromgit.utilimportto_native_path_linux,join_path_native
2626

2727

‎git/test/test_tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
Tree,
1414
Blob
1515
)
16-
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
16+
fromgit.utilimportHIDE_WINDOWS_KNOWN_ERRORS
1717
fromgit.test.libimportTestBase
1818

1919

‎git/util.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
fromfunctoolsimportwraps
1818

1919
fromgit.compatimportis_win
20-
fromgitdb.utilimport (# NOQA
20+
fromgitdb.utilimport (# NOQA
2121
make_sha,
2222
LockedFD,# @UnusedImport
2323
file_contents_ro,# @UnusedImport
@@ -44,7 +44,13 @@
4444
__all__= ("stream_copy","join_path","to_native_path_windows","to_native_path_linux",
4545
"join_path_native","Stats","IndexFileSHA1Writer","Iterable","IterableList",
4646
"BlockingLockFile","LockFile",'Actor','get_user_id','assure_directory_exists',
47-
'RemoteProgress','CallableRemoteProgress','rmtree','unbare_repo')
47+
'RemoteProgress','CallableRemoteProgress','rmtree','unbare_repo',
48+
'HIDE_WINDOWS_KNOWN_ERRORS')
49+
50+
#: We need an easy way to see if Appveyor TCs start failing,
51+
#: so the errors marked with this var are considered "acknowledged" ones, awaiting remedy,
52+
#: till then, we wish to hide them.
53+
HIDE_WINDOWS_KNOWN_ERRORS=is_winandos.environ.get('HIDE_WINDOWS_KNOWN_ERRORS',True)
4854

4955
#{ Utility Methods
5056

@@ -76,7 +82,6 @@ def onerror(func, path, exc_info):
7682
try:
7783
func(path)# Will scream if still not possible to delete.
7884
exceptExceptionasex:
79-
fromgit.test.lib.helperimportHIDE_WINDOWS_KNOWN_ERRORS
8085
ifHIDE_WINDOWS_KNOWN_ERRORS:
8186
raiseSkipTest("FIXME: fails with: PermissionError\n %s",ex)
8287
else:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp