Changeset View
Changeset View
Standalone View
Standalone View
swh/model/tests/test_identifiers.py
Show First 20 Lines • Show All 1,052 Lines • ▼ Show 20 Lines | [ | ||||
"swh:1:", | "swh:1:", | ||||
"swh:", | "swh:", | ||||
"swh:1:cnt:", | "swh:1:cnt:", | ||||
"foo:1:cnt:abc8bc9d7a6bcf6db04f476d29314f157507d505", | "foo:1:cnt:abc8bc9d7a6bcf6db04f476d29314f157507d505", | ||||
"swh:2:dir:def8bc9d7a6bcf6db04f476d29314f157507d505", | "swh:2:dir:def8bc9d7a6bcf6db04f476d29314f157507d505", | ||||
"swh:1:foo:fed8bc9d7a6bcf6db04f476d29314f157507d505", | "swh:1:foo:fed8bc9d7a6bcf6db04f476d29314f157507d505", | ||||
"swh:1:dir:0b6959356d30f1a4e9b7f6bca59b9a336464c03d;invalid;malformed", | "swh:1:dir:0b6959356d30f1a4e9b7f6bca59b9a336464c03d;invalid;malformed", | ||||
"swh:1:snp:gh6959356d30f1a4e9b7f6bca59b9a336464c03d", | "swh:1:snp:gh6959356d30f1a4e9b7f6bca59b9a336464c03d", | ||||
"swh:1:snp:foo", | "swh:1:snp:foo", | ||||
# wrong qualifier: ori should be origin | |||||
"swh:1:dir:0b6959356d30f1a4e9b7f6bca59b9a336464c03d;ori=something;anchor=1;visit=1;path=/", # noqa | |||||
# wrong qualifier: anc should be anchor | |||||
"swh:1:dir:0b6959356d30f1a4e9b7f6bca59b9a336464c03d;origin=something;anc=1;visit=1;path=/", # noqa | |||||
# wrong qualifier: vis should be visit | |||||
"swh:1:dir:0b6959356d30f1a4e9b7f6bca59b9a336464c03d;origin=something;anchor=1;vis=1;path=/", # noqa | |||||
# wrong qualifier: pa should be path | |||||
"swh:1:dir:0b6959356d30f1a4e9b7f6bca59b9a336464c03d;origin=something;anchor=1;visit=1;pa=/", # noqa | |||||
# wrong qualifier: line should be lines | |||||
vlorentz: what does "off" mean?
and you can move `# noqa` at the end of the list so you don't have to… | |||||
Done Inline Actionsoff as in off course so in the end, i mean`wrong` but it's 3 characters more to typ ¯\_(ツ)_/¯ i'll check the noqa hint (i'm not sure it works) thanks. ardumont: off as in `off course` so in the end, i mean`wrong` but it's 3 characters more to typ ¯\_(ツ)_/¯… | |||||
Done Inline Actionsnah, it complains [1], i gather what you had in mind was for the docstring. [1] $ flake8 swh swh/model/tests/test_identifiers.py:1063:89: E501 line too long (99 > 88 characters) swh/model/tests/test_identifiers.py:1065:89: E501 line too long (99 > 88 characters) swh/model/tests/test_identifiers.py:1067:89: E501 line too long (100 > 88 characters) swh/model/tests/test_identifiers.py:1069:89: E501 line too long (100 > 88 characters) swh/model/tests/test_identifiers.py:1071:89: E501 line too long (110 > 88 characters) swh/model/tests/test_identifiers.py:1074:89: E501 line too long (101 > 88 characters) swh/model/tests/test_identifiers.py:1075:89: E501 line too long (109 > 88 characters) ardumont: nah, it complains [1], i gather what you had in mind was for the docstring.
[1]
```
$ flake8… | |||||
Done Inline Actionsrenamed off to wrong. ardumont: renamed off to wrong. | |||||
"swh:1:dir:0b6959356d30f1a4e9b7f6bca59b9a336464c03d;line=10;origin=something;anchor=1;visit=1;path=/", # noqa | |||||
], | ], | ||||
) | ) | ||||
def test_parse_swhid_parsing_error(invalid_swhid): | def test_parse_swhid_parsing_error(invalid_swhid): | ||||
with pytest.raises(ValidationError): | with pytest.raises(ValidationError): | ||||
identifiers.parse_swhid(invalid_swhid) | identifiers.parse_swhid(invalid_swhid) | ||||
@pytest.mark.parametrize( | @pytest.mark.parametrize( | ||||
▲ Show 20 Lines • Show All 79 Lines • Show Last 20 Lines |
what does "off" mean?
and you can move # noqa at the end of the list so you don't have to repeat it, iirc