docstr: Compare calculation against known value, if available
docstr_tok: ["Compare","calculation","against","known","value",",","if","available"]
code: def numeric_tester(
      self, calc_type, calc_value, data_type, used_locale
  ):
      """Compare calculation against known value, if available"""
      try:
          set_locale = setlocale(LC_NUMERIC)
      except Error:
          set_locale = "<not able to determine>"
      known_value = known_numerics.get(used_locale, ("", ""))[
          data_type == "thousands_sep"
      ]
      if known_value and calc_value:
          self.assertEqual(
              calc_value,
              known_value,
              self.lc_numeric_err_msg
              % (
                  calc_value,
                  known_value,
                  calc_type,
                  data_type,
                  set_locale,
                  used_locale,
              ),
          )
          return True
  
file_path: cpython/Lib/test/test__locale.py
imports: from _locale import setlocale, LC_ALL, LC_CTYPE, LC_NUMERIC, localeconv, Error
  import locale
  import sys
  import unittest
  from platform import uname
  from test import support
label_desc: Use image node_id 3 for calling the _LocaleTests obj's underlying member method code with example usage: obj.numeric_tester(calc_type, calc_value, data_type, used_locale) and returns: True