Skip to content

GEOPY-2700: Random failure of name incrementor test#842

Merged
domfournier merged 2 commits intodevelopfrom
GEOPY-2700
Feb 13, 2026
Merged

GEOPY-2700: Random failure of name incrementor test#842
domfournier merged 2 commits intodevelopfrom
GEOPY-2700

Conversation

@domfournier
Copy link
Contributor

@domfournier domfournier commented Feb 12, 2026

GEOPY-2700 - Random failure of name incrementor test
The random name generator could sometimes give two classes with the same name, more likely to happen for single-letter class names. It will be much rarer if we have a mimimum of 2 letters per name.

@github-actions github-actions bot changed the title GEOPY-2700 GEOPY-2700: Random failure of name incrementor test Feb 12, 2026
Copy link
Contributor

@MatthieuCMira MatthieuCMira left a comment

Choose a reason for hiding this comment

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

augment n

Copy link
Contributor

@MatthieuCMira MatthieuCMira left a comment

Choose a reason for hiding this comment

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

doesn't hjave to be random lenght

random_len = random.randint(2, n_class)
value_map[ref] = "".join(
random.choice(string.ascii_lowercase) for i in range(random_len)
random.choice(string.ascii_lowercase) for _ in range(random_len)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can just be a long word

Suggested change
random.choice(string.ascii_lowercase) for _ in range(random_len)
random.choice(string.ascii_lowercase) for _ in range(5)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True that.

Copy link
Contributor

@MatthieuCMira MatthieuCMira left a comment

Choose a reason for hiding this comment

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

way cleaner :-)

@domfournier domfournier merged commit dd535ed into develop Feb 13, 2026
16 of 17 checks passed
@domfournier domfournier deleted the GEOPY-2700 branch February 13, 2026 17:37
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