okfn-brasil / serenata-toolbox

📦 pip module containing code shared across Serenata de Amor's projects | ** Este repositório não recebe atualizações frequentes **
MIT License
154 stars 69 forks source link

Add cities dataset to latest datasets download list #80

Closed cuducos closed 7 years ago

cuducos commented 7 years ago

Fix #78

cuducos commented 7 years ago
def TestLatest(TestCase):

    def test_cities_was_added(self):
        self.assertIn('2017-05-22-brazilian-cities.csv', Datasets().downloader.LATEST)

Or even:

    def test_latest(self):
        self.assertEqual(28, len(Datasets().downloader.LATEST))

But the real question is would it worth it?

lipemorais commented 7 years ago

I don't think that this kind of year worth.

What can be done to protect us from the future ourselves ?

May it should break if any of this files are removed from this list?

lipemorais commented 7 years ago

... this kind of test* ...

cuducos commented 7 years ago

May it should break if any of this files are removed from this list?

I don't think so, because we remove old versions when there are new ones available… although we would never see the len() of the list get smaller, because we would either replace a file (adding a newer version) or add a new dataset (which was not present in the list before).

lipemorais commented 7 years ago

Why is this constant important for toolbox?

The LATEST constant is not used anywhere in this file, if I remove it all project tests will pass smoothly. Is it OK?

cuducos commented 7 years ago

It's used here, in a function documented here.

Maybe the test you'd like to enhance is this one.

lipemorais commented 7 years ago

Is there any point against enhance this tests?

cuducos commented 7 years ago

Is there any point against enhance this tests?

Not at all ; )