alessandro trinca tornidor commited on
Commit
426598f
·
1 Parent(s): 1b93e57

doc: update README.md about test execution, remove unused test helper function

Browse files
README.md CHANGED
@@ -79,6 +79,19 @@ In this case my 'mutant' test coverage progression (Total jobs: 377 / Complete:
79
  2. Surviving mutants: 74 (19.63%)
80
  3. Surviving mutants: 3 (0.80%)
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  ### E2E tests with playwright
83
 
84
  Normally I use Visual Studio Code to write and execute my playwright tests, however it's always possible to run them from cli (from the `static` folder, using a node package manager like `npm` or `pnpm`):
 
79
  2. Surviving mutants: 74 (19.63%)
80
  3. Surviving mutants: 3 (0.80%)
81
 
82
+ In case of errors on executing the `pytest` files remove the python cache before re-run the tests:
83
+
84
+ ```bash
85
+ find tests -name "__pycache__" -exec rm -rf {} \;
86
+ find aip_trainer -name "__pycache__" -exec rm -rf {} \;
87
+ ```
88
+
89
+ Then execute the tests again:
90
+
91
+ ```bash
92
+ pytest --cov=aip_trainer --cov-report=term-missing && coverage html
93
+ ```
94
+
95
  ### E2E tests with playwright
96
 
97
  Normally I use Visual Studio Code to write and execute my playwright tests, however it's always possible to run them from cli (from the `static` folder, using a node package manager like `npm` or `pnpm`):
tests/lambdas/test_lambdaSpeechToScore.py CHANGED
@@ -20,17 +20,6 @@ def set_seed(seed=0):
20
  torch.manual_seed(seed)
21
 
22
 
23
- def get_request_body(language, text, base64_audio=None):
24
- body = json.dumps(
25
- {
26
- "language": language,
27
- "title": text,
28
- "base64Audio": f"data:audio/ogg;;base64,{base64_audio}",
29
- }
30
- )
31
- return {"body": body}
32
-
33
-
34
  def assert_raises_get_speech_to_score_dict(
35
  cls, real_text, file_bytes_or_audiotmpfile, language, exc, error_message
36
  ):
 
20
  torch.manual_seed(seed)
21
 
22
 
 
 
 
 
 
 
 
 
 
 
 
23
  def assert_raises_get_speech_to_score_dict(
24
  cls, real_text, file_bytes_or_audiotmpfile, language, exc, error_message
25
  ):