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

Add bail out #22

Merged
merged 4 commits into from
May 9, 2021
Merged

Add bail out #22

merged 4 commits into from
May 9, 2021

Conversation

fmartinsons
Copy link
Contributor

Hello,

this MR principally add the Bail Out! pattern support as defined in https://testanything.org/tap-version-13-specification.html.
I also add an option to make the xml output compact and improve XML generation for tests that have been not found (for example after a Bail Out).

I also added a test file to emphasize the change. For information this test file gives

<?xml version="1.0" encoding="utf-8"?>
<testsuites disabled="0" errors="0" failures="2" tests="5" time="0.0">
	<testsuite disabled="0" errors="0" failures="2" name="test-bailout" skipped="0" tests="5" time="0" hostname="SGX-CMP-776">
		<testcase name="/MyTest/1"/>
		<testcase name="/MyTest/2"/>
		<testcase name="/MyTest/3"/>
		<testcase name="None">
			<failure type="failure" message=" (0)"/>
		</testcase>
		<testcase name="None">
			<failure type="failure" message=" (0)"/>
		</testcase>
	</testsuite>
</testsuites>

for the master and

<?xml version="1.0" encoding="utf-8"?>
<testsuites disabled="0" errors="1" failures="1" tests="5" time="0.0">
	<testsuite disabled="0" errors="1" failures="1" name="test/fixtures/test-bailout" skipped="0" tests="5" time="0" hostname="SGX-CMP-776">
		<testcase name="/MyTest/1"/>
		<testcase name="/MyTest/2"/>
		<testcase name="/MyTest/3"/>
		<testcase name="Bail out for Test 4">
			<failure type="failure" message=" (0)"/>
			<system-err>Fatal condition met which prevent to continue</system-err>
		</testcase>
		<testcase name="Test 5 missing">
			<error type="-1" message="missing (-1)"/>
		</testcase>
	</testsuite>
</testsuites>

with this MR

@cclauss
Copy link
Collaborator

cclauss commented May 8, 2021

We will need to reestablish tests on GitHub Actions.

@fmartinsons
Copy link
Contributor Author

Ok, can I do something for that ?

tap2junit/tap13.py Outdated Show resolved Hide resolved
tap2junit/tap13.py Outdated Show resolved Hide resolved
tap2junit/__main__.py Outdated Show resolved Hide resolved
@cclauss
Copy link
Collaborator

cclauss commented May 8, 2021

Closing and reopening to rebase.

@cclauss cclauss closed this May 8, 2021
@cclauss cclauss reopened this May 8, 2021
@cclauss
Copy link
Collaborator

cclauss commented May 8, 2021

Please add the test to https://github.com/nodejs/tap2junit/blob/master/.github/workflows/lint_python.yml#L22

fmartinsons and others added 4 commits May 9, 2021 06:57
It can be useful to save some space on disk for big files.

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
And a test case for Bail Out

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
Add recursive option for isort and update .gitignore for mypy generated directory

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
@cclauss cclauss merged commit be4ce46 into nodejs:master May 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants