mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Test: Merged tw-1542.t into uda.t
This commit is contained in:
parent
58fe2326db
commit
484c8cc367
2 changed files with 25 additions and 66 deletions
25
test/uda.t
25
test/uda.t
|
@ -303,6 +303,31 @@ class Test1447(TestCase):
|
|||
self.assertIn('one', out)
|
||||
|
||||
|
||||
class Test1542(TestCase):
|
||||
def setUp(self):
|
||||
self.t = Task()
|
||||
self.t.config("uda.bugid.type", "numeric")
|
||||
self.t.config("uda.bugid.label", "BugID")
|
||||
|
||||
def test_large_numeric_uda_retains_value(self):
|
||||
"""
|
||||
1542: Make sure the numeric UDA value 1187962 does not get converted to
|
||||
scientific notation on export.
|
||||
"""
|
||||
self.t('add large bugid:1187962')
|
||||
code, out, err = self.t('1 export')
|
||||
self.assertIn("\"bugid\":1187962,", out)
|
||||
|
||||
def test_small_numeric_uda_retains_value(self):
|
||||
"""
|
||||
1542: Make sure the numeric UDA value 43.21 does not get converted to
|
||||
integer on export.
|
||||
"""
|
||||
self.t('add small bugid:43.21')
|
||||
code, out, err = self.t('1 export')
|
||||
self.assertIn("\"bugid\":43.21", out)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
unittest.main(testRunner=TAPTestRunner())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue