Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 13, 2024
1 parent 255b847 commit efc1acc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion vizro-ai/tests/e2e/test_vizro_ai_ui.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import os

import pytest
from e2e_fake_data_generator import create_genre_popularity_by_country
from e2e_waiters import (
wait_for,
webdriver_click_waiter,
webdriver_waiter,
webdriver_waiter_css,
)
from selenium.common import InvalidSelectorException, TimeoutException
from e2e_fake_data_generator import create_genre_popularity_by_country


@pytest.mark.parametrize(
Expand Down
38 changes: 27 additions & 11 deletions vizro-ai/tests/tests_utils/e2e_fake_data_generator.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,37 @@
import pandas as pd
import random

import pandas as pd

# List of music genres
music_genres = [
"Pop", "Rock", "Hip-Hop", "Jazz", "Classical", "Electronic",
"Reggae", "Country", "Blues", "R&B", "Metal", "Folk"
"Pop",
"Rock",
"Hip-Hop",
"Jazz",
"Classical",
"Electronic",
"Reggae",
"Country",
"Blues",
"R&B",
"Metal",
"Folk",
]

# List of countries
countries = [
"United States", "Canada", "United Kingdom", "Germany", "France",
"Japan", "Australia", "Brazil", "India", "South Korea", "Italy", "Spain"
"United States",
"Canada",
"United Kingdom",
"Germany",
"France",
"Japan",
"Australia",
"Brazil",
"India",
"South Korea",
"Italy",
"Spain",
]


Expand All @@ -25,11 +46,6 @@ def create_genre_popularity_by_country(start_year=1980, end_year=2023, records_p
country = random.choice(countries)
popularity_score = round(random.uniform(0, 100), 2) # Popularity score between 0 and 100

data.append({
"Year": year,
"Country": country,
"Genre": genre,
"Popularity Score": popularity_score
})
data.append({"Year": year, "Country": country, "Genre": genre, "Popularity Score": popularity_score})

return pd.DataFrame(data)

0 comments on commit efc1acc

Please sign in to comment.