# Path: foil/converters.py
# def nan_to_none(value):
#     return None if isnan(value) else value
# 
# def none_to_nan(value):
#     return nan if value is None else value


import unittest
from math import isnan, nan
from foil.converters import nan_to_none, none_to_nan



class TestNanConverters(unittest.TestCase):

    def test_nan_to_none(self):
        self.assertIsNone(nan_to_none(nan))

# Path: foil/converters.py
# def nan_to_none(value):
#     return None if isnan(value) else value
# 
# def none_to_nan(value):
#     return nan if value is None else value


# Path: tests/test_converters.py
import unittest
from math import isnan, nan
from foil.converters import nan_to_none, none_to_nan




class TestNanConverters(unittest.TestCase):

    def test_nan_to_none(self):
        self.assertIsNone(nan_to_none(nan))

        self.assertEqual(1, nan_to_none(1))