          pos_inf = float(1e30000)
          self.assertEqual(floatformat(pos_inf), six.text_type(pos_inf))
  
          neg_inf = float(-1e30000)
          self.assertEqual(floatformat(neg_inf), six.text_type(neg_inf))
  
          nan = pos_inf / pos_inf
          self.assertEqual(floatformat(nan), six.text_type(nan))
  
      def test_float_dunder_method(self):
 
</s> remove         self.assertEqual(floatformat(pos_inf), six.text_type(pos_inf))
 </s> add         self.assertEqual(floatformat(pos_inf), str(pos_inf)) </s> remove         self.assertEqual(floatformat(nan), six.text_type(nan))
 </s> add         self.assertEqual(floatformat(nan), str(nan)) </s> remove             if isinstance(self.remote_field.model, six.string_types):
 </s> add             if isinstance(self.remote_field.model, str): </s> remove         conn.encoders[SafeText] = conn.encoders[six.text_type]
 </s> add         conn.encoders[SafeText] = conn.encoders[str] </s> remove         lazy_obj = lazy(lambda: original_object, six.text_type)
 </s> add         lazy_obj = lazy(lambda: original_object, str)
        self.assertEqual(floatformat(neg_inf), str(neg_inf))
          pos_inf = float(1e30000)
          self.assertEqual(floatformat(pos_inf), six.text_type(pos_inf))
  
          neg_inf = float(-1e30000)
        self.assertEqual(floatformat(neg_inf), str(neg_inf))
  
          nan = pos_inf / pos_inf
          self.assertEqual(floatformat(nan), six.text_type(nan))
  
      def test_float_dunder_method(self):
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
tests/template_tests/filter_tests/test_floatformat.py