Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /randovania_randovania /test /lib /test_dataclass_lib.py
| import dataclasses | |
| import pytest | |
| from randovania.lib.dataclass_lib import get_field | |
| class DummyDataclass: | |
| field: bool = dataclasses.field(default=True, metadata={"foo": "bar"}) | |
| def test_get_field(dataclass): | |
| # extant field | |
| assert get_field(dataclass, "field").metadata["foo"] == "bar" | |
| # non-existent field | |
| with pytest.raises(AttributeError, match="DummyDataclass has no field 'fake_field'"): | |
| get_field(dataclass, "fake_field") | |
Xet Storage Details
- Size:
- 559 Bytes
- Xet hash:
- 2c7cdbf872c4808f382cb570875d33aa162a4c423d2a1629306e5969d2bc55ad
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.