Merge Pytest to ‘main’#1107
Conversation
ea560b2 to
aaa18f0
Compare
|
Fixed the bug I found in Poetry: python-poetry/poetry#3395 |
873e0f9 to
78f1687
Compare
|
Hey @squirrelsc, I'm going to start working on merging code in (specifically around requirements and whatnot). I guess I'll open PRs to this branch? |
48ed328 to
543c33f
Compare
86dba88 to
a19f848
Compare
It’s hidden so that tools like `pytest` and `rg` ignore it by default.
This is a _working_ test.
Extend Fabric’s Connection class with a new (and simple) command “cat” which return the value of a remote file as a string. Setup a Config for the Connection when creating it that echoes every command, disables the stdin forwarding (since we’re running under Pytest), and fixes the PATH since the remote commands don’t run under a login shell.
This could be extended to instead deploy a host of the specified distro. Most likely we’ll want a command-line parameter that the fixture uses to create a Node with the given requirements, and then tests will be skipped if their requirements aren’t met. Further more, the mark here is very simple. It can instead take keyword arguments, which would map to our metadata.
As supplying types for these would be supremely annoying.
b2af6ee to
f7b08e6
Compare
f7b08e6 to
df1084f
Compare
When deploying new targets, we should only lock the cache afterwards so the lock isn’t waiting on the deployment itself. We should also catch any exception in the deployment, so we can still delete whatever may have succeeded. This also makes the `get_targets()` logic more clear. Searching for cached targets (and creating instances from cached data) is fast enough that I’m not worried about locking the cache around it.
ce2ef35 to
5698484
Compare
Also remove the set log level, as this is the default.
Otherwise they can’t be published themselves. This we should override the dependency at the top-level so we can install it from the local source in editable mode.
5698484 to
b9a67b9
Compare
|
I have to say I like what I see here. Justo a kudos, for posterity. |
|
Thank you so much @glima, that's incredibly validating, and I really appreciate it 😁 |
|
@andschwa Any reason you keep opening this PR? |
@squirrelsc what is your plan? Saw the conflict. |
|
@juhlee-microsoft It's still open because this is still what's designed and documented at https://microsoft.github.io/lisa/, published on PyPI at https://pypi.org/project/pytest-lisa/, https://pypi.org/project/pytest-playbook/, and https://pypi.org/project/pytest-target/, what was presented to LSG for LISAv3, and last I heard from @simonxiaoss what was to be merged and used. However, the work to do that is not something I have capacity for as I am no longer on the Linux Validation team. Let me know what you end up doing! |
@andschwa I suggest you keep the changes in your repo and can open the new PR once the work is done. I understand you have no capacity of this work this time. |
|
@juhlee-microsoft the changes are in this repo because that's from where the the website is published and where the published PyPI packages point. They'll have to stay where they are until maintainers of this repo fix that up. The only conflicts are that @simonxiaoss asked me to delete the other prototype, but I didn't want to do that to @squirrelsc, so we compromised on doing a |
No problem. In this case, please close PR only, but we can keep your branch. It's good to tag like 'do not delete' |
|
Close the old PRs. Feel free to open it, if you are working on it continually. |
This merges the Pytest branch to the
mainbranch! I've moved the existing code into.archiveso it's a bit easier to reuse and apply. Once we have the example tests from the previous prototype working, we can delete.archive(but in this way the full commit history is preserved). Also, since we'll have several OSS Python packages to publish on PyPi, we need to do source code approvals again anyway, and so we might as well switch to using the MIT License. Finally, the approval process for themainbranch needs to be updated too.