-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtester.py
More file actions
34 lines (25 loc) · 883 Bytes
/
tester.py
File metadata and controls
34 lines (25 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# basic testing for utils and functions
from utils.processors import scan_file, get_file_path
import logging
import json
log_format = "%(asctime)s - %(levelname)-5s - %(filename)s:%(lineno)s - %(funcName)s - %(message)s"
logging.basicConfig(filename='dev-ai-test.log', filemode='w',level=logging.INFO,format=log_format)
# print(scan_file("tests/index.html.erb","html"))
# print(scan_file("tests/user.rb","ruby"))
test_file_paths_1="""
```html
<!-- /app/myapp/index.html.erb -->
```
"""
print(get_file_path(test_file_paths_1))
plain_data="""{
"update_files": [
"/app/cashier/src/common/components/cashier/Main.tsx",
"/app/cashier/src/common/hoc/Cashier.tsx",
"/app/cashier/src/redux/actions/cashier.ts",
"/app/cashier/src/redux/reducers/index.ts",
"/app/cashier/src/redux/store.ts"
]
}
"""
json_data = json.loads(plain_data)