예제 #1
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_keyword__of__absent(self):
     with self.assertNotFound():
         __unit__.find(of=None, in_=self.LIST)
예제 #2
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_positional__list__normal(self):
     for elem in self.LIST:
         self.assertEquals(elem, __unit__.find(elem, self.LIST))
예제 #3
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_keyword__only_list(self):
     with self.assertRaises(TypeError):
         __unit__.find(in_=self.LIST)
예제 #4
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_positional__list__some_object(self):
     with self.assertRaises(TypeError):
         __unit__.find(None, object())
예제 #5
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_positional__list__empty(self):
     with self.assertNotFound():
         __unit__.find(None, [])
     for elem in self.LIST:
         with self.assertNotFound():
             __unit__.find(elem, [])
예제 #6
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_keyword__where__present(self):
     self.assertEquals(
         self.FIRST_EVEN, __unit__.find(where=self.EVEN, in_=self.LIST))
     self.assertEquals(
         self.FIRST_ODD, __unit__.find(where=self.ODD, in_=self.LIST))
예제 #7
0
 def test_positional__list__some_object(self):
     with self.assertRaises(TypeError):
         __unit__.find(None, object())
예제 #8
0
 def test_keyword__where__absent(self):
     with self.assertNotFound():
         __unit__.find(where=self.NEGATIVE, in_=self.LIST)
예제 #9
0
 def test_keyword__where__present(self):
     self.assertEquals(self.FIRST_EVEN,
                       __unit__.find(where=self.EVEN, in_=self.LIST))
     self.assertEquals(self.FIRST_ODD,
                       __unit__.find(where=self.ODD, in_=self.LIST))
예제 #10
0
 def test_keyword__of__absent(self):
     with self.assertNotFound():
         __unit__.find(of=None, in_=self.LIST)
예제 #11
0
 def test_keyword__of__present(self):
     for elem in self.LIST:
         self.assertEquals(elem, __unit__.find(of=elem, in_=self.LIST))
예제 #12
0
 def test_keyword__only_list(self):
     with self.assertRaises(TypeError):
         __unit__.find(in_=self.LIST)
예제 #13
0
 def test_positional__list__normal(self):
     for elem in self.LIST:
         self.assertEquals(elem, __unit__.find(elem, self.LIST))
예제 #14
0
 def test_positional__list__empty(self):
     with self.assertNotFound():
         __unit__.find(None, [])
     for elem in self.LIST:
         with self.assertNotFound():
             __unit__.find(elem, [])
예제 #15
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_keyword__of__present(self):
     for elem in self.LIST:
         self.assertEquals(elem, __unit__.find(of=elem, in_=self.LIST))
예제 #16
0
 def test_keyword__both(self):
     with self.assertRaises(TypeError):
         __unit__.find(of=None, where=self.EVEN, in_=self.LIST)
예제 #17
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_keyword__where__absent(self):
     with self.assertNotFound():
         __unit__.find(where=self.NEGATIVE, in_=self.LIST)
예제 #18
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_positional__list__none(self):
     with self.assertRaises(TypeError):
         __unit__.find(None, None)
예제 #19
0
파일: test_lists.py 프로젝트: Xion/taipan
 def test_keyword__both(self):
     with self.assertRaises(TypeError):
         __unit__.find(of=None, where=self.EVEN, in_=self.LIST)
예제 #20
0
 def test_positional__list__none(self):
     with self.assertRaises(TypeError):
         __unit__.find(None, None)