qa
-
Python json dump and loadPython/pytest 2022. 1. 1. 13:40
How to use json dump and json load from fixtures using tmpdir_factory? We need two separate files First conftest.py file, and the second test_auhor.py file #conftest.py @pytest.fixture(scope="module") def author_file_json(tmpdir_factory): """Write some authors to a data file.""" python_author_data = { 'Ned': {'City':'Boston'}, 'Brian': {'City': 'Portland'}, 'Luciano': {'City': 'Sau Paulo'} } fil..