Skip to content

Commit

Permalink
add random int
Browse files Browse the repository at this point in the history
  • Loading branch information
EeroEternal committed Dec 2, 2022
1 parent 83790f5 commit 1a1afc8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/magicbag/mock/int.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""Int type generator."""

import random


def random_int(fix_length):
"""Generate fix length random int.
Args:
fix_length (int): fix length
Return:
(int): random int
"""
return random.randint(10 ** (fix_length - 1), 10**fix_length - 1)

0 comments on commit 1a1afc8

Please sign in to comment.