PATH:
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
testfixtures
/
tests
import re from testfixtures import StringComparison as S, compare from unittest import TestCase class Tests(TestCase): def test_equal_yes(self): self.assertTrue('on 40220' == S('on \d+')) def test_equal_no(self): self.assertFalse('on xxx' == S('on \d+')) def test_not_equal_yes(self): self.assertFalse('on 40220' != S('on \d+')) def test_not_equal_no(self): self.assertTrue('on xxx' != S('on \d+')) def test_comp_in_sequence(self): self.assertTrue(( 1, 2, 'on 40220' ) == ( 1, 2, S('on \d+') )) def test_not_string(self): self.assertFalse(40220 == S('on \d+')) def test_repr(self): compare('<S:on \\d+>', repr(S('on \d+'))) def test_str(self): compare('<S:on \\d+>', str(S('on \d+'))) def test_sort(self): a = S('a') b = S('b') c = S('c') compare(sorted(('d', c, 'e', a, 'a1', b)), [a, 'a1', b, c, 'd', 'e']) def test_flags_argument(self): compare(S(".*bar", re.DOTALL), actual="foo\nbar") def test_flags_parameter(self): compare(S(".*bar", flags=re.DOTALL), actual="foo\nbar") def test_flags_names(self): compare(S(".*BaR", dotall=True, ignorecase=True), actual="foo\nbar")
[-] test_should_raise.py
[open]
[-] test_twisted.py
[open]
[-] sample1.py
[open]
[+]
..
[-] test_shouldwarn.py
[open]
[-] test_time.py
[open]
[-] test_mappingcomparison.py
[open]
[+]
__pycache__
[-] test_datetime.py
[open]
[-] directory-contents.txt
[open]
[-] test_tempdir.py
[open]
[-] test_replace.py
[open]
[-] test_logcapture.py
[open]
[-] test_generator.py
[open]
[-] test_sybil.py
[open]
[-] test_sequencecomparison.py
[open]
[-] test_mock.py
[open]
[-] test_compare.py
[open]
[-] test_components.py
[open]
[-] test_popen.py
[open]
[+]
test_django
[-] configparser-read.txt
[open]
[-] test_outputcapture.py
[open]
[-] test_date.py
[open]
[-] sample3.py
[open]
[-] test_tempdirectory.py
[open]
[-] test_replacer.py
[open]
[-] configparser-write.txt
[open]
[-] test_stringcomparison.py
[open]
[-] sample2.py
[open]
[-] test_roundcomparison.py
[open]
[-] __init__.py
[open]
[-] test_comparison.py
[open]
[-] test_diff.py
[open]
[-] test_wrap.py
[open]
[-] test_rangecomparison.py
[open]
[-] test_log_capture.py
[open]
[-] test_popen_docs.py
[open]