★ wanayoo — archive 1999 https://github.com/pytest-dev/pytest-html/pull/286Nouvelle recherche | Portail wanayoo
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

Environment table #286

Open
wants to merge 5 commits into
base: master
from
Open

Environment table #286

wants to merge 5 commits into from

Conversation

@werdeil
Copy link
Contributor

werdeil commented Mar 20, 2020

Following remarks made on PR 281, here is a first version of the EnvironmentTable class which allow to use new hooks.

@BeyondEvil tell me if it is what you had in mind.

Copy link
Contributor

BeyondEvil left a comment

Great start!

Please see comments. :)

pytest_html/plugin.py Outdated Show resolved Hide resolved
pytest_html/plugin.py Outdated Show resolved Hide resolved
@@ -336,6 +336,38 @@ def _append_video(self, extra, extra_index, test_index):
)
self.additional_html.append(html.div(html_div, class_="video"))

class EnvironmentTable:
def __init__(self, config):

This comment has been minimized.

@BeyondEvil

BeyondEvil Mar 20, 2020 Contributor

I would split this big init up into smaller functions.

Think builder pattern.

This comment has been minimized.

@werdeil

werdeil Mar 20, 2020 Author Contributor

Not really sure to understand what to do here, I agree that everything in the init is not good but the function I can think of (generate_header, generate_row, ...) are very small... Do you want something like that?

This comment has been minimized.

@BeyondEvil

BeyondEvil Mar 20, 2020 Contributor

Yeah, I'm having trouble articulating the vision I have in my head. Give me the weekend to see if I can throw something together that you can refine. :)

@BeyondEvil
Copy link
Contributor

BeyondEvil commented Mar 20, 2020

Regarding builder pattern. We can have a default configuration and then users can use hooks to add to that config.

@werdeil
Copy link
Contributor Author

werdeil commented Mar 23, 2020

Hi @BeyondEvil I just pushed something, tell me if it is what you are thinking when you say "builder pattern"

@werdeil werdeil requested a review from BeyondEvil Apr 6, 2020
@ssbarnea
Copy link
Collaborator

ssbarnea commented May 16, 2020

How about a rebase?

@werdeil werdeil force-pushed the werdeil:environment_table branch from a064b92 to 8e14277 May 18, 2020
@werdeil
Copy link
Contributor Author

werdeil commented May 18, 2020

@ssbarnea Rebase done but there are failing tests, I guess they are new, I'll have a look

Vincent VERDEIL and others added 2 commits May 18, 2020
Vincent VERDEIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.