Advertisement
Guest User

Untitled

a guest
Mar 4th, 2022
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.64 KB | None | 0 0
  1. # with fixtures
  2.  
  3. @pytest.fixture()
  4. def give_me_alphabet_twice():
  5.     return string.ascii_lowercase * 2
  6.  
  7. def test_remove_all_a(give_me_alphabet_twice):
  8.     assert 'a' not in remove_all_a(give_me_alphabet_twice)
  9.  
  10. def test_remove_all_b(give_me_alphabet_twice):
  11.     assert 'b' not in remove_all_b(give_me_alphabet_twice)
  12.  
  13. ########################################
  14. # without fixtures
  15.  
  16. def give_me_alphabet_thirce():
  17.     return string.ascii_lowercase * 3
  18.  
  19. def test_remove_all_a_again():
  20.     assert 'a' not in remove_all_a(give_me_alphabet_thirce())
  21.  
  22. def test_remove_all_b_again():
  23.     assert 'b' not in remove_all_b(give_me_alphabet_thirce())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement