Closed PhilippvK closed 1 year ago
this test case cannot pass. Should I init MlonMcuContext with read lock for this test case?
def test_nest_context(monkeypatch, fake_environment_directory: Path, fake_config_home: Path):
monkeypatch.chdir(fake_environment_directory)
create_minimal_environment_yaml(fake_environment_directory / "environment.yml")
with mlonmcu.context.context.MlonMcuContext() as context:
assert context
with mlonmcu.context.context.MlonMcuContext() as context2:
assert context2
@zhouxinyu0723 I think we should refactor this one to check several cases (valid and invalid ones):
The default case which is now write + write should fail.
For success
you can just week using assertions, for fail
you can use pytest.raises
or something similar.
@zhouxinyu0723 Can you give me an update on the status? If this is ready for review, remove the "Draft: " prefix from the PR title.
In addition, to keep the commit history clean, I would recommend doing a rebase on origin/main
+ squashing of similar commits. I can show you how to achieve this, if you need help.
Looks good to merge. Thank you! I will update the README later.
74