(self)
| 57 | |
| 58 | @pytest.mark.vcr() |
| 59 | def test_numeric_value(self): |
| 60 | numeric_value = 1.0 / 1024 |
| 61 | # Use a formula here to avoid issues with differing decimal marks: |
| 62 | self.sheet.update_acell("A1", "= 1 / 1024") |
| 63 | cell = self.sheet.acell("A1") |
| 64 | self.assertEqual(cell.numeric_value, numeric_value) |
| 65 | self.assertIsInstance(cell.numeric_value, float) |
| 66 | |
| 67 | # test value for popular format with long numbers |
| 68 | numeric_value = 2000000.01 |
| 69 | self.sheet.update_acell("A1", "2,000,000.01") |
| 70 | cell = self.sheet.acell("A1") |
| 71 | self.assertEqual(cell.numeric_value, numeric_value) |
| 72 | self.assertIsInstance(cell.numeric_value, float) |
| 73 | |
| 74 | # test non numeric value |
| 75 | self.sheet.update_acell("A1", "Non-numeric value") |
| 76 | cell = self.sheet.acell("A1") |
| 77 | self.assertEqual(cell.numeric_value, None) |
| 78 | |
| 79 | @pytest.mark.vcr() |
| 80 | def test_a1_value(self): |
nothing calls this directly
no test coverage detected