Skip to content

Instantly share code, notes, and snippets.

@JoaquinAcuna97
Created August 6, 2021 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoaquinAcuna97/90648a00bdddd18a2bf5516af4e0e0a5 to your computer and use it in GitHub Desktop.
Save JoaquinAcuna97/90648a00bdddd18a2bf5516af4e0e0a5 to your computer and use it in GitHub Desktop.
import unittest
from generator import generator
def test_sample_single_word():
l = ('test', 'a', 'word')
word = generator.sample(l)
assert word in l
def test_sample_multiple_words():
l = ('test', 'multiple', 'words')
words = generator.sample(l, 2)
assert len(words) == 2
def test_generate_a_movie_with_tree_words():
movie = generator.generate_movie()
assert len(movie.split(' ')) >= 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment