Esempio n. 1
0
 def test_not_a_seq_complex(self, not_a_seq_complex: Any) -> None:
     assert (not is_sequence(not_a_seq_complex)
             or isinstance(not_a_seq_complex, str)
             or any(not is_complex(c) for c in not_a_seq_complex))
Esempio n. 2
0
 def test_not_a_seq_float(self, not_a_seq_float: Any) -> None:
     assert (not is_sequence(not_a_seq_float)
             or isinstance(not_a_seq_float, str)
             or any(not is_numeric(f) or is_integer(f) or is_complex(f)
                    for f in not_a_seq_float))
Esempio n. 3
0
 def test_a_seq_complex(self, a_seq_complex: Any) -> None:
     assert is_sequence(a_seq_complex)
     assert len(a_seq_complex) >= 0
     assert all(is_complex(c) for c in a_seq_complex)
Esempio n. 4
0
 def test_a_seq_float(self, a_seq_float: Any) -> None:
     assert is_sequence(a_seq_float)
     assert len(a_seq_float) >= 0
     assert all(
         is_numeric(f) and not is_integer(f) and not is_complex(f)
         for f in a_seq_float)
Esempio n. 5
0
 def test_not_a_complex(self, not_a_complex: Any) -> None:
     assert is_sequence(not_a_complex) or not is_complex(not_a_complex)
Esempio n. 6
0
 def test_a_complex(self, a_complex: Any) -> None:
     assert is_complex(a_complex)
Esempio n. 7
0
 def test_not_a_float(self, not_a_float: Any) -> None:
     assert (not is_numeric(not_a_float) or is_integer(not_a_float)
             or is_complex(not_a_float))
Esempio n. 8
0
 def test_a_float(self, a_float: Any) -> None:
     assert (is_numeric(a_float) and not is_integer(a_float)
             and not is_complex(a_float))