-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from jitseniesen/nose
PR: Support nose2 as testing framework instead of nose
- Loading branch information
Showing
11 changed files
with
85 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
flaky | ||
nose | ||
nose2 | ||
pytest>=5 | ||
pytest-cov | ||
pytest-qt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright © 2013 Spyder Project Contributors | ||
# Licensed under the terms of the MIT License | ||
# (see LICENSE.txt for details) | ||
"""Tests for nose2runner.py""" | ||
|
||
# Local imports | ||
from spyder_unittest.backend.nose2runner import Nose2Runner | ||
from spyder_unittest.backend.runnerbase import Category | ||
|
||
|
||
def test_nose2runner_load_data(tmpdir): | ||
result_file = tmpdir.join('results') | ||
result_txt = """ | ||
<testsuite name="nose2-junit" errors="0" failures="1" skipped="0" tests="2" time="0.000"> | ||
<testcase time="0.04" classname="test_foo" name="test1"> | ||
<system-out /> | ||
</testcase> | ||
<testcase time="0.01" classname="test_foo" name="test2"> | ||
<failure message="test failure">text</failure> | ||
<system-out /> | ||
</testcase> | ||
</testsuite>""" | ||
result_file.write(result_txt) | ||
runner = Nose2Runner(None, result_file.strpath) | ||
results = runner.load_data() | ||
assert len(results) == 2 | ||
|
||
assert results[0].category == Category.OK | ||
assert results[0].status == 'ok' | ||
assert results[0].name == 'test_foo.test1' | ||
assert results[0].message == '' | ||
assert results[0].time == 0.04 | ||
assert results[0].extra_text == [] | ||
|
||
assert results[1].category == Category.FAIL | ||
assert results[1].status == 'failure' | ||
assert results[1].name == 'test_foo.test2' | ||
assert results[1].message == 'test failure' | ||
assert results[1].time == 0.01 | ||
assert results[1].extra_text == ['text'] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters