diff options
Diffstat (limited to 'common/read_data.py')
| -rw-r--r-- | common/read_data.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/common/read_data.py b/common/read_data.py new file mode 100644 index 00000000..69d6478c --- /dev/null +++ b/common/read_data.py @@ -0,0 +1,16 @@ +import json + +class ReadData: + def __init__(self): + print(__file__) + + @property + def read_from_json(self): + with open("C:/zcw/aoto_selenium/testdata/demo1_data.json", "r") as f: + data = json.load(f)["item"] + data = list(data) + return data + + +if __name__ == '__main__': + ReadData().read_from_json
\ No newline at end of file |
