mercredi 9 décembre 2020

How do I open multiple .json files at once that contain test cases?

This is sample code that works for one json file. I need to load credit.json, housingP.json , mood.json , churn.json inside testSplited folder.

def load_test_params():
    with open(filePath + '/testsSplited/churn.json') as json_file:
    
        data = json.load(json_file)

        assert len(data['tests']) > 0
        test_params = data['tests']
        return test_params

TEST_PARAMS = load_test_params()

Aucun commentaire:

Enregistrer un commentaire