• Home
  • Raw
  • Download

Lines Matching refs:_components

110 def _components(r):  function
132 self.assertEqual((0, 1), _components(F()))
133 self.assertEqual((7, 1), _components(F(7)))
134 self.assertEqual((7, 3), _components(F(F(7, 3))))
136 self.assertEqual((-1, 1), _components(F(-1, 1)))
137 self.assertEqual((-1, 1), _components(F(1, -1)))
138 self.assertEqual((1, 1), _components(F(-2, -2)))
139 self.assertEqual((1, 2), _components(F(5, 10)))
140 self.assertEqual((7, 15), _components(F(7, 15)))
141 self.assertEqual((10**23, 1), _components(F(10**23)))
143 self.assertEqual((3, 77), _components(F(F(3, 7), 11)))
144 self.assertEqual((-9, 5), _components(F(2, F(-10, 9))))
145 self.assertEqual((2486, 2485), _components(F(F(22, 7), F(355, 113))))
157 self.assertEqual((5, 2), _components(F(2.5)))
158 self.assertEqual((0, 1), _components(F(-0.0)))
160 _components(F(0.1)))
167 _components(F(Decimal('1.1'))))
169 _components(F(Decimal('3.5e-2'))))
171 _components(F(Decimal('.000e20'))))
178 self.assertEqual((5, 1), _components(F("5")))
179 self.assertEqual((3, 2), _components(F("3/2")))
180 self.assertEqual((3, 2), _components(F(" \n +3/2")))
181 self.assertEqual((-3, 2), _components(F("-3/2 ")))
182 self.assertEqual((13, 2), _components(F(" 013/02 \n ")))
183 self.assertEqual((13, 2), _components(F(u" 013/02 \n ")))
185 self.assertEqual((16, 5), _components(F(" 3.2 ")))
186 self.assertEqual((-16, 5), _components(F(u" -3.2 ")))
187 self.assertEqual((-3, 1), _components(F(u" -3. ")))
188 self.assertEqual((3, 5), _components(F(u" .6 ")))
189 self.assertEqual((1, 3125), _components(F("32.e-5")))
190 self.assertEqual((1000000, 1), _components(F("1E+06")))
191 self.assertEqual((-12300, 1), _components(F("-1.23e4")))
192 self.assertEqual((0, 1), _components(F(" .0e+0\t")))
193 self.assertEqual((0, 1), _components(F("-0.000e0")))
236 self.assertEqual((7, 3), _components(r))
240 self.assertEqual((7, 3), _components(r))
245 self.assertEqual((4, 2), _components(r))
251 self.assertEqual((10, 1), _components(F.from_float(10)))
253 self.assertEqual((bigint, 1), _components(F.from_float(bigint)))
254 self.assertEqual((0, 1), _components(F.from_float(-0.0)))
255 self.assertEqual((10, 1), _components(F.from_float(10.0)))
256 self.assertEqual((-5, 2), _components(F.from_float(-2.5)))
258 _components(F.from_float(1e23)))
261 _components(F.from_float(3.2)))