kopia lustrzana https://github.com/NanoVNA-Saver/nanovna-saver
added test for printing NaN (Not a Number)
rodzic
879d5ddea3
commit
8e73456668
|
@ -1,8 +1,10 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
0.5.4
|
||||
-----
|
||||
0.5.4-pre
|
||||
---------
|
||||
|
||||
- Refectoring of Analysis modules
|
||||
|
||||
0.5.3
|
||||
-----
|
||||
|
|
|
@ -19,6 +19,8 @@ Latest Changes
|
|||
|
||||
### Changes in 0.5.4-pre
|
||||
|
||||
- Refactoring of Analysis modules
|
||||
|
||||
### Changes in 0.5.3
|
||||
|
||||
- Python 3.10 compatability fixes
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
import unittest
|
||||
from math import inf
|
||||
from math import inf, nan
|
||||
from decimal import Decimal # Needed for test_representation()
|
||||
|
||||
# Import targets to be tested
|
||||
|
@ -81,6 +81,7 @@ class TestTSIToolsValue(unittest.TestCase):
|
|||
self.assertEqual(str(Value(1e24)), "1.00000Y")
|
||||
self.assertEqual(str(Value(1e27)), "\N{INFINITY}")
|
||||
self.assertEqual(str(Value(-1e27)), "-\N{INFINITY}")
|
||||
self.assertEqual(str(Value(nan)), "NaN")
|
||||
self.assertEqual(float(Value(1e27)), 1e27)
|
||||
self.assertEqual(
|
||||
str(Value(11, fmt=Format(printable_max=10))), '')
|
||||
|
|
Ładowanie…
Reference in New Issue