Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BF(TST): do not expect log message for guessing Path to be possibly a URL on windows #6911

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

yarikoptic
Copy link
Member

Since paths are actually containg \ not / like on POSIX/in urls.

Prehistory:

In #6891 I have missed the fact that windows on appveyor was not happy! (on the importance of having CI green!!!!):

https://ci.appveyor.com/project/mih/datalad/builds/44287617/job/fgp764p65r1ba5oj

____________________________ test_pathri_guessing _____________________________
filename = 'C:\\DLTMP\\datalad_temp_pwl4puuu'
	@with_tempfile
	def test_pathri_guessing(filename=None):
		# Complaining about ;param only at DEBUG level
		# see https://github.com/datalad/datalad/issues/6872
		with swallow_logs(new_level=logging.DEBUG) as cml:
			# we don't "care" about params ATM so there is a warning if there are any
			ri = RI(f"{filename};param")
			assert isinstance(ri, PathRI)
>           assert_in('ParseResults contains params', cml.out)
..\datalad\support\tests\test_network.py:229:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
first = 'ParseResults contains params', second = '', msg = None
	def assert_in(first, second, msg=None):
		if msg is None:
>           assert first in second
E           AssertionError: assert 'ParseResults contains params' in ''
..\datalad\tests\utils_pytest.py:131: AssertionError
============================== warnings summary ===============================
datalad/support/tests/test_cookies.py::test_no_blows

and indeed only on windows:

(git)smaug:/mnt/datasets/datalad/ci/logs/2022/08[master]git
$> git grep FAIL.*test_pathri_guessing
02/pr/6907/7226824/appveyor-8314-failed/84vlamobs20bbih0.txt:[00:46:09] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...
02/push/rf-minor/7226824/appveyor-8313-failed/pl2n7yc5jfgv9lpe.txt:[00:40:49] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...

$> cd ../07

$> git grep FAIL.*test_pathri_guessing
26/pr/6891/2dfa4f6/appveyor-8280-failed/fgp764p65r1ba5oj.txt:[00:39:18] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...
29/pr/6898/fe417e0/appveyor-8300-failed/twx5hrhmt2u5ks4n.txt:[00:40:33] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...
29/pr/6899/c3e2ed8/appveyor-8301-failed/8cbph0v7xetnpm8g.txt:[00:39:12] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...
29/pr/6902/2f9e1ac/appveyor-8302-failed/l4xy5rv7a0p88wk5.txt:[00:39:36] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...
29/push/maint/825c8e0/appveyor-8299-failed/xn68pxgkuxf27iya.txt:[00:37:40] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...
git grep FAIL.*test_pathri_guessing  5.46s user 8.23s system 102% cpu 13.398 total

… URL on windows

Since paths are actually containg \ not / like on POSIX/in urls.

Prehistory:

In datalad#6891 I have missed the fact that windows on appveyor was not happy! (on the importance of having CI green!!!!):

https://ci.appveyor.com/project/mih/datalad/builds/44287617/job/fgp764p65r1ba5oj

	____________________________ test_pathri_guessing _____________________________
	filename = 'C:\\DLTMP\\datalad_temp_pwl4puuu'
		@with_tempfile
		def test_pathri_guessing(filename=None):
			# Complaining about ;param only at DEBUG level
			# see datalad#6872
			with swallow_logs(new_level=logging.DEBUG) as cml:
				# we don't "care" about params ATM so there is a warning if there are any
				ri = RI(f"{filename};param")
				assert isinstance(ri, PathRI)
	>           assert_in('ParseResults contains params', cml.out)
	..\datalad\support\tests\test_network.py:229:
	_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
	first = 'ParseResults contains params', second = '', msg = None
		def assert_in(first, second, msg=None):
			if msg is None:
	>           assert first in second
	E           AssertionError: assert 'ParseResults contains params' in ''
	..\datalad\tests\utils_pytest.py:131: AssertionError
	============================== warnings summary ===============================
	datalad/support/tests/test_cookies.py::test_no_blows

and indeed only on windows:

	(git)smaug:/mnt/datasets/datalad/ci/logs/2022/08[master]git
	$> git grep FAIL.*test_pathri_guessing
	02/pr/6907/7226824/appveyor-8314-failed/84vlamobs20bbih0.txt:[00:46:09] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...
	02/push/rf-minor/7226824/appveyor-8313-failed/pl2n7yc5jfgv9lpe.txt:[00:40:49] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...

	$> cd ../07

	$> git grep FAIL.*test_pathri_guessing
	26/pr/6891/2dfa4f6/appveyor-8280-failed/fgp764p65r1ba5oj.txt:[00:39:18] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...
	29/pr/6898/fe417e0/appveyor-8300-failed/twx5hrhmt2u5ks4n.txt:[00:40:33] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...
	29/pr/6899/c3e2ed8/appveyor-8301-failed/8cbph0v7xetnpm8g.txt:[00:39:12] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...
	29/pr/6902/2f9e1ac/appveyor-8302-failed/l4xy5rv7a0p88wk5.txt:[00:39:36] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...
	29/push/maint/825c8e0/appveyor-8299-failed/xn68pxgkuxf27iya.txt:[00:37:40] FAILED ..\datalad\support\tests\test_network.py::test_pathri_guessing - Asser...
	git grep FAIL.*test_pathri_guessing  5.46s user 8.23s system 102% cpu 13.398 total
@yarikoptic yarikoptic added platform-windows Issue concerned with Windows semver-tests Changes only affect tests, no impact on version labels Aug 3, 2022
@codecov
Copy link

codecov bot commented Aug 3, 2022

Codecov Report

Merging #6911 (db08c95) into maint (825c8e0) will increase coverage by 0.99%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##            maint    #6911      +/-   ##
==========================================
+ Coverage   90.15%   91.15%   +0.99%     
==========================================
  Files         354      354              
  Lines       46221    46222       +1     
==========================================
+ Hits        41670    42132     +462     
+ Misses       4551     4090     -461     
Impacted Files Coverage Δ
datalad/support/tests/test_network.py 100.00% <100.00%> (ø)
datalad/_version.py 45.68% <0.00%> (-0.28%) ⬇️
datalad/support/tests/test_annexrepo.py 97.82% <0.00%> (-0.07%) ⬇️
datalad/local/rerun.py 96.41% <0.00%> (+0.65%) ⬆️
datalad/local/tests/test_rerun.py 88.61% <0.00%> (+1.54%) ⬆️
datalad/local/tests/test_unlock.py 100.00% <0.00%> (+2.02%) ⬆️
datalad/ui/dialog.py 93.04% <0.00%> (+2.67%) ⬆️
datalad/support/tests/test_path.py 97.43% <0.00%> (+5.12%) ⬆️
datalad/tests/utils.py 66.76% <0.00%> (+9.92%) ⬆️
datalad/tests/test_tests_utils.py 92.34% <0.00%> (+92.34%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@yarikoptic yarikoptic merged commit 3a16b86 into datalad:maint Aug 3, 2022
@yarikoptic yarikoptic deleted the bf-pathri-guess-test branch October 14, 2022 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform-windows Issue concerned with Windows semver-tests Changes only affect tests, no impact on version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant