Page MenuHomeSoftware Heritage

tests: replace nose with pytest
ClosedPublic

Authored by douardda on Oct 24 2018, 7:23 PM.

Details

Summary

We do use the pytest-django plugin to manage the django db setup magic,
so with this change, we can run tests without an existing db, or starting
a postgres db dedicated to the tests using pifpaf.

related to T1261

also:

  • replace assertEquals -> assertEqual

related to T1247.

Test Plan

tox should be happy, hopefully jenkins will also

Diff Detail

Repository
rDDEP Push deposit
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olasd added a subscriber: olasd.

Looks good to me.

I don't quite understand what the "fs" marks are supposed to convey, but they're carried over from nose without change, so *shrug*.

This revision is now accepted and ready to land.Oct 24 2018, 11:21 PM
In D592#11583, @olasd wrote:

I don't quite understand what the "fs" marks are supposed to convey, but they're carried over from nose without change, so *shrug*.

I think they were meant to convey the need of a local FS-based external dataset, which used to be swh-storage-testdata. Now that it is is gone the corresponding tag can probably be gone too.

Awesome, thanks for that.

I think they were meant to convey the need of a local FS-based external dataset,

Yes.
That and also the fact that they manipulate the filesystem (write to /tmp, etc...)

(swh-storage-testdata was never involved here though).

This revision was automatically updated to reflect the committed changes.