Skip to content

Add unit tests for properties #18

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

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

Zechereh
Copy link
Contributor

No description provided.

Comment on lines -28 to -36
def _generate_vendor(self) -> str:
"""Generates the vendor based on the user agent."""

return random.choice(self.webgl_properties)["vendor"]

def _generate_renderer(self) -> str:
"""Generates the renderer based on the user agent."""

return random.choice(self.webgl_properties)["renderer"]
Copy link
Contributor Author

@Zechereh Zechereh Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This approach allowed for potential mismatches of a vendor and renderer. (i.e AMD as the vendor and a NVIDIA GTX 1660 as the rendered)

Consolidated the logic into one random.choice() call to prevent this.

LMK if this was by design

@Zechereh Zechereh merged commit 014322a into main Oct 31, 2024
1 check passed
@Zechereh Zechereh deleted the zach/tf-4049-add-unit-tests-for-properties branch October 31, 2024 19:45
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