Master programming syntax, solve interactive challenges & run live code in Syntaxis Explore Arena →
menu_book Course Curriculum (Software Testing) expand_more
Software Testing / Test Doubles & Dependencies

randomness control

Learn randomness control in Software Testing with a dedicated explanation, a concept-specific example, practical cautions, and a mastery check.

12 min read • Intermediate
software-testing-022.py
python
import random
rng=random.Random(123)
first=[rng.randint(1,6) for _ in range(4)]
rng=random.Random(123)
assert first == [rng.randint(1,6) for _ in range(4)]
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content