From anonymous, 1 Month ago, written in Python.
Embed
  1. import pytest
  2.  
  3. def test_eq_text():
  4.     assert 'spam' == 'eggs'
  5.  
  6. def test_eq_similar_text():
  7.     assert 'foo 1 bar' == 'foo 2 bar'
  8.  
  9. def test_eq_long_text():
  10.     a = '1'*100 + 'a' + '2'*100
  11.     b = '1'*100 + 'b' + '2'*100
  12.     assert a == b
  13.  
  14. def test_eq_list():
  15.     assert [0, 1, 2] == [0, 1, 3]
  16.  
  17. def test_eq_dict():
  18.     assert {'a': 0, 'b': 1} == {'a': 0, 'b': 2}
  19.  
  20. def test_eq_set():
  21.     assert {0, 10, 11, 12} == {0, 20, 21}
  22.  
  23. def test_eq_longer_list():
  24.     assert [1, 2] == [1, 2,3]
  25.  
  26. def test_not_in_text_single():
  27.     text = 'single foo line'
  28.     assert 'foo' not in text
  29.