Roundup Tracker - Issues

Message5575

Author rouilj
Recipients antmail, rouilj
Date 2016-06-04.03:24:56
Message-id <1465010697.88.0.510687127841.issue2550886@psf.upfronthosting.co.za>
In-reply-to
Hi Anthony:

In your patch for roundup/hyperdb.py you have:

class Integer(_Type):
    """An object designating an integer property"""
    def from_raw(self, value, translator=translation, **kw):
        value = value.strip()
        ...

but there is no translation function/variable/... in the current
roundup code.

I removed that argument and it seems to have stopped the tests
from crashing. I also reverted a change you made to the testNumber
function in test/test_hyperdbvals.py.

-        self.assertEqual(self._test('number', '  10 '), 10)
+        self.assertEqual(self._test('number', '  1 '), 1)

I reinstated the test against 10 and removed the test against 1.

I also added test for:

    self.assertEqual(self._test('integer', '  0 '), 0)
    self.assertNotEqual(self._test('integer', '  -100.2 '), -100.2)

to testInteger since I assume it should truncate the .2, and I wanted to
test 0 as the midpoint of the range.

I also updated the docs to include Integer in the places where Number
was mentioned.

I am currently running:

  python run_tests.py -k 'not test_postgresql'

if it all passes I plan on checking it in unless you have an issue
with my changes above.
History
Date User Action Args
2016-06-04 03:24:57rouiljsetmessageid: <1465010697.88.0.510687127841.issue2550886@psf.upfronthosting.co.za>
2016-06-04 03:24:57rouiljsetrecipients: + rouilj, antmail
2016-06-04 03:24:57rouiljlinkissue2550886 messages
2016-06-04 03:24:56rouiljcreate