HI Stefano, I like PyCharm too and even though uplink is great, there is no substitute for seeing the green
======================= 53 passed in 5.83 s =============================
like you see, after all your pytests pass running completely on your laptop
I am going a little bit further now and able to test some client_side Forms on my laptop. Like you,
I substituted the anvil
folder for server-side tests and the _anvil_designer
folder for the client-side tests. pyDALAnvilWorks on GitHub
For the database, I am using a sqlite substitution, wrapping pyDAL (database abstraction layer) with anvil.works commands so I do not have to change any server or client side code.
Its all pretty rough around the edges right now, but its got to the stage that something like the following can run on your laptop without internet:
def test_init(self):
# set repeating panel items
user = anvil.users.get_user()
contact = contact_generator(user). # this is a dictionary
contact_form = ContactForm(contact=contact). # this is a form with repeating panels, text_boxes
# check that initialized ok by reading the forms and setting the new contact
assert contact['name'] == contact_form.text_box_name.text
assert contact['phone_list'][0].number == contact_form.repeating_phone_list.items[0]['text']
contact_form.button_save_click()