Skip to content

Commit aaa337a

Browse files
committed
temp
1 parent d8f09d7 commit aaa337a

File tree

3 files changed

+68
-4
lines changed

3 files changed

+68
-4
lines changed

rplugin/python3/ultest/handler/parsers/output/python/pytest.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def failed_test_section_title():
5959
)
6060
namespaces = name_elements[:-1]
6161
test_name = name_elements[-1]
62-
yield p.space() >> p.many1(p.string("_"))
62+
yield until_eol
6363
return (namespaces, test_name)
6464

6565

@@ -74,8 +74,7 @@ def failed_test_captured_output_sections():
7474

7575
@generate
7676
def failed_test_code_sections():
77-
78-
sections = yield p.sepBy(failed_test_code_section, failed_test_section_sep)
77+
sections = yield p.sepBy1(failed_test_code_section, failed_test_section_sep)
7978
return sections
8079

8180

tests/mocks/test_outputs/pytest_hypothesis_2

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
================================================= test session starts ==================================================
2+
platform linux -- Python 3.8.6, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
3+
rootdir: /home/ronan/Dev/repos/hypothesis, configfile: pytest.ini
4+
plugins: xdist-2.4.0, forked-1.3.0, hypothesis-6.24.0
5+
collecting ... collected 1 item 
6+
7+
tests/numpy/test_from_dtype.py F [100%]
8+
9+
======================================================= FAILURES =======================================================
10+
______________________________________________ test_can_cast_for_scalars _______________________________________________
11+
Traceback (most recent call last):
12+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/tests/numpy/test_from_dtype.py", line 80, in test_can_cast_for_scalars
13+
def test_can_cast_for_scalars(data):
14+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/core.py", line 1199, in wrapped_test
15+
raise the_error_hypothesis_found
16+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/core.py", line 1168, in wrapped_test
17+
state.run_engine()
18+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/core.py", line 780, in run_engine
19+
runner.run()
20+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/internal/conjecture/engine.py", line 475, in run
21+
self._run()
22+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/internal/conjecture/engine.py", line 877, in _run
23+
self.generate_new_examples()
24+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/internal/conjecture/engine.py", line 609, in generate_new_examples
25+
zero_data = self.cached_test_function(bytes(BUFFER_SIZE))
26+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/internal/conjecture/engine.py", line 1056, in cached_test_function
27+
self.test_function(data)
28+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/internal/conjecture/engine.py", line 213, in test_function
29+
self.__stoppable_test_function(data)
30+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/internal/conjecture/engine.py", line 189, in __stoppable_test_function
31+
self._test_function(data)
32+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/core.py", line 727, in _execute_once_for_engine
33+
escalate_hypothesis_internal_error()
34+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/core.py", line 701, in _execute_once_for_engine
35+
result = self.execute_once(data)
36+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/core.py", line 639, in execute_once
37+
result = self.test_runner(data, run)
38+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/executors.py", line 52, in default_new_style_executor
39+
return function(data)
40+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/core.py", line 635, in run
41+
return test(*args, **kwargs)
42+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/tests/numpy/test_from_dtype.py", line 80, in test_can_cast_for_scalars
43+
def test_can_cast_for_scalars(data):
44+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/core.py", line 577, in test
45+
result = self.test(*args, **kwargs)
46+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/tests/numpy/test_from_dtype.py", line 87, in test_can_cast_for_scalars
47+
result = data.draw(
48+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/strategies/_internal/core.py", line 1692, in draw
49+
result = self.conjecture_data.draw(strategy)
50+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/internal/conjecture/data.py", line 866, in draw
51+
strategy.validate()
52+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/strategies/_internal/strategies.py", line 401, in validate
53+
self.do_validate()
54+
File "/home/ronan/Dev/repos/hypothesis/hypothesis-python/src/hypothesis/strategies/_internal/lazy.py", line 134, in do_validate
55+
assert isinstance(w, SearchStrategy), f"{self!r} returned non-strategy {w!r}"
56+
AssertionError: arrays(dtype=dtype('int16'), shape=(), elements=from_dtype(dtype('bool'))) returned non-strategy []
57+
------------------------------------------------------ Hypothesis ------------------------------------------------------
58+
You can add @seed(11024453522097809882419571698055639517) to this test or run pytest with --hypothesis-seed=11024453522097809882419571698055639517 to reproduce this failure.
59+
================================================= slowest 20 durations =================================================
60+
0.01s setup hypothesis-python/tests/numpy/test_from_dtype.py::test_can_cast_for_scalars
61+
62+
(2 durations < 0.005s hidden. Use -vv to show these durations.)
63+
=============================================== short test summary info ================================================
64+
FAILED tests/numpy/test_from_dtype.py::test_can_cast_for_scalars - AssertionError: arrays(dtype=dtype('int16'), shape...
65+
================================================== 1 failed in 0.06s ===================================================

tests/unit/handler/parsers/output/python/test_pytest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_parse_file(self):
8585
)
8686

8787
def test_parse_hypothesis_file(self):
88-
output = get_output("pytest_hypothesis")
88+
output = get_output("pytest_hypothesis_2")
8989
parser = OutputParser([])
9090
result = parser.parse_failed("python#pytest", output)
9191
self.assertEqual(

0 commit comments

Comments
 (0)