I recently started having some quick tests run automatically any time I run a “Debug” session of my app, which I generally try to do before each commit. So I guess that counts as semi-automatic testing, though it’s slightly short of continuous integration of tests.
The unittest module on the server (or why not use pytest?) provides nicer output than the limited Skulpt implementation client-side, but that requires the Full Python environment only available to paid users. So for this demo, I only use the client-side unittest module (which is needed anyway for tests of client-only functionality), though I also provide the server-side way commented out.
Hi Tim, I have been using pytest to develop server-side code. All my tests are on my laptop. I clone my app, and then use the anvil.yaml file to generate a database definition. With this, and https://github.com/benlawraus/pyDALAnvilWorks I then use a sqlite database to run tests within PyCharm. Why bother? I really like PyCharm !
A few bugs to fix before doing that. I updated it to include any_of and all_of. You mind giving the script on the repo’s GitHub a run and let me know if it works? You need to clone the example app before doing so.
I don’t think I’m going to get to this for a while. (For starters, I’d have to figure out how to run a .zsh, though I probably should already know.) Maybe @owen.campbell or @stefano.menci or others would be interested in giving it a try?
oh sorry, just copy and past the terminal part of the README into your terminal. I wonder if I should put the entire address of my anvil app there so you do not have to copy the anvil app to your account. There is no security risk right? I mean the xxxxxx part:
git clone ssh://ben.yyyyy@anvil.works:2222/xxxxxxxxxxx.git pyDALAnvilWorksApp
OK, I see. I don’t think there is any risk, as long as you don’t mind sharing your email address, but I don’t know enough to feel comfortable giving advice on it. I think the way you have it is fine, since folks will want to know how to do it with their own apps, anyhow.
Love this. I still haven’t made time to test your stuff, but I’m determined to do so. I’ve always wanted PyCharm (or another full-featured editor) to integrate better with Anvil. Actually, on that note, I want to make sure you’ve seen this discussion: PyCharm Integration
My understanding is that the most expert Anvil users tend to all switch back and forth between the Anvil IDE and their local editor (if not work entirely offline).
Anvil should use it or do something like in a Pycharm / VSC extension so we don’t have to do any kind of manual linking to use high powered bazooka IDEs.
I would give a kidney to have this. Seriously I will pay for this kind of extension to be developed, as long as it’s done by Anvil and not a one off thing.