-
Notifications
You must be signed in to change notification settings - Fork 75
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
pytest-sugar is not working with pytest v5.4.0 (released on March 12th 2020) #187
Comments
It seems that direct access to https://github.com/pytest-dev/pytest/blob/master/src/_pytest/terminal.py#L285-L293 and that https://github.com/pytest-dev/pytest/blob/master/src/_pytest/terminal.py#L361-L362 I suggest: diff --git a/pytest_sugar.py b/pytest_sugar.py
index c479dab..35d018a 100644
--- a/pytest_sugar.py
+++ b/pytest_sugar.py
@@ -211,7 +211,6 @@ def pytest_report_teststatus(report):
class SugarTerminalReporter(TerminalReporter):
def __init__(self, reporter):
TerminalReporter.__init__(self, reporter.config)
- self.writer = self._tw
self.paths_left = []
self.tests_count = 0
self.tests_taken = 0
@@ -339,14 +338,14 @@ class SugarTerminalReporter(TerminalReporter):
def overwrite(self, line, rel_line_num):
# Move cursor up rel_line_num lines
if rel_line_num > 0:
- self.writer.write("\033[%dA" % rel_line_num)
+ self.write("\033[%dA" % rel_line_num)
# Overwrite the line
- self.writer.write("\r%s" % line)
+ self.write("\r%s" % line)
# Return cursor to original line
if rel_line_num > 0:
- self.writer.write("\033[%dB" % rel_line_num)
+ self.write("\033[%dB" % rel_line_num)
def get_max_column_for_test_status(self):
return (
@@ -389,7 +388,7 @@ class SugarTerminalReporter(TerminalReporter):
else:
self.current_lines[path] = " " * (2 + len(fspath))
self.current_line_nums[path] = self.current_line_num
- self.writer.write("\r\n")
+ self.write("\r\n")
def reached_last_column_for_test_status(self, report):
len_line = real_string_length( |
@GuillaumeFavelier |
pytest-sugar does not work with current pytest, as per Teemu/pytest-sugar#187. It's not vital to our test process, so we will do without. Closes #897.
Hello! It looks like all fixes were merged already. Can I ask when the new version with fixes planned to be released? |
pytest-sugar does not work with new pytest version Teemu/pytest-sugar#187 Let's just freeze pytest version in the meantime
pytest-sugar currently doesn't support pytest 5.4, see Teemu/pytest-sugar#187
* TESTS: Try to fix CI pytest-sugar currently doesn't support pytest 5.4, see Teemu/pytest-sugar#187 * Fix minimal install * Update doc env too
The version 5.4.0 of pytest introduced a regression preventing pytest-sugar from working (see [1] and [2]) It has been fixed in pytest (see [3]) and waiting a new release of pytest is published, this commit updates requirements. [1] Teemu/pytest-sugar#187 [2] amueller#535 (comment) [3] pytest-dev/pytest#6986
Hello there, I'm gettin ga little confused. What's the state of this? Are we waiting on pytest or this plugin to have a fix/release? Cheers :) |
On the same page, is it possible for a fix this issue so that |
#188 will make pytest-sugar use the recommended API, which is also backward compatible.
This is also true, |
Thanks! :) Right so, until either of them are released, we should limit to pytests 5.4.1 or below, right? |
I think |
great. thank you. went for this:
|
For those who don't want to install in editable mode, you can drop the |
See: Teemu/pytest-sugar#187 Signed-off-by: Aurélien Bompard <[email protected]>
Just noting that as of today, latest pytest(5.4.1) & pytest-sugar(0.9.3) in PyPi still fail with:
|
I've raised #194 to track that error - this one is fixed |
this is to address incompatibility issues between latest version of pytest and pytest-sugar Teemu/pytest-sugar#187 Teemu/pytest-sugar#194
The plugin does currently not work with PyTest 5.4+, see Teemu/pytest-sugar#187. Until this issue is fixed and a new version of the plugin is released, we deactivate it to upgrade the dependencies.
pytest-sugar is not working with pytest v5.4.0 (released on March 12th 2020)
The text was updated successfully, but these errors were encountered: