⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.144
Server IP:
157.245.143.252
Server:
Linux www 6.11.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 14 13:19:59 UTC 2024 x86_64
Server Software:
nginx/1.26.0
PHP Version:
8.3.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
python3-hamcrest
/
examples
/
View File Name :
ExampleWithAssertThat.py
import sys sys.path.append("..") from hamcrest import * import unittest class ExampleWithAssertThat(unittest.TestCase): def testUsingAssertThat(self): assert_that("xx", is_("xx")) assert_that("yy", is_not("xx")) assert_that("i like cheese", contains_string("cheese")) def testCanAlsoSupplyDescriptiveReason(self): assert_that("xx", is_("xx"), "description") def testCanAlsoAssertPlainBooleans(self): assert_that(True, "This had better not fail") if __name__ == "__main__": unittest.main()