Details
- Reviewers
vlorentz - Group Reviewers
Reviewers - Commits
- rDLDTAR9525a6c370cc: utils: Simplify random_block according to latest api change
rDLDTAR9cc9149c0ddb: loader.tar.utils: Add tests to random_block function
rDLDTAR20f199bb9657: swh.loader.tar.utils: Remove duplicated grouper definition
rDLDTAR849e3b640d10: swh.loader.tar.db: Remove dead code
tox
The tests won't build up until the diff is landed and a
new tag is pushed though.
Diff Detail
- Repository
- rDLDTAR Tarball Loader
- Branch
- master
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 2949 Build 3757: tox-on-jenkins Jenkins Build 3756: arc lint + arc unit
Event Timeline
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DLDTAR/job/tox/46/
See console output for more information: https://jenkins.softwareheritage.org/job/DLDTAR/job/tox/46/console
Are you sure these tests pass when the other Diff is merged?
Because the blocks in actual_data are shuffled, self.assertIn(d, expected_data) has a 1/block_size of raising an AssertionError on each loop iteration.
swh/loader/tar/tests/test_utils.py | ||
---|---|---|
14–26 | This method looks like assertCountEqual, with less checks on duplicated values (eg. assert_ok([1, 2, 2, 3], [1, 2, 3, 3]) succeeds). Also, I don't understand why you shuffle expected_data. | |
swh/loader/tar/utils.py | ||
30 | Extra point for un-shadowing that variable :) |
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DLDTAR/job/tox/47/
See console output for more information: https://jenkins.softwareheritage.org/job/DLDTAR/job/tox/47/console
Are you sure these tests pass when the other Diff is merged?
I temporarily copied the new implementation (each time) to make sure tests are fine.
So yes.
Because the blocks in actual_data are shuffled, self.assertIn(d, expected_data) has a 1/block_size of raising an AssertionError on each loop iteration.
I did not get it yet.
I do not expect errors as you mentioned.
In the end random_blocks yields all values as if it's one iterable. If you call list on it, it will return a list of elements (not a list of list of elements).
It's called random blocks because it randomizes the iterable (most likely a generator so no length) per block of a given size.
Not sure if i'm relevant here (like i said i did not get the remark yet ;)
swh/loader/tar/tests/test_utils.py | ||
---|---|---|
14–26 |
Just because i don't want to check the order. |
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DLDTAR/job/tox/48/
See console output for more information: https://jenkins.softwareheritage.org/job/DLDTAR/job/tox/48/console
Build is green
See https://jenkins.softwareheritage.org/job/DLDTAR/job/tox/52/ for more details.