File tree Expand file tree Collapse file tree 3 files changed +5
-16
lines changed Expand file tree Collapse file tree 3 files changed +5
-16
lines changed Original file line number Diff line number Diff line change 34
34
run : python -m mypy src
35
35
36
36
- name : 👷 Run Tests
37
- run : pytest --cov-report html
38
-
39
- - name : 🚮 Remove test environment
40
- run : |
41
- deactivate
42
- rm -rf testenv
37
+ run : pytest
Original file line number Diff line number Diff line change 1
1
import asyncio
2
2
import json
3
3
import tempfile
4
- from os .path import abspath , dirname , join
5
4
from typing import Generator
6
5
7
6
import pytest
23
22
postgresql_proc = factories .postgresql_proc (port = None , unixsocketdir = socket_dir .name )
24
23
postgresql_mocked = factories .postgresql (
25
24
"postgresql_proc" ,
26
- load = [join ( dirname ( dirname ( abspath ( __file__ ))), "database/init.sql" ) ],
25
+ load = ["database/init.sql" ],
27
26
)
28
27
29
28
EMAIL_LIST = [
Original file line number Diff line number Diff line change 2
2
import json
3
3
import os
4
4
from json import JSONDecodeError
5
- from os .path import abspath , dirname , join
6
5
from typing import List , Tuple
7
6
8
7
import pytest
14
13
15
14
def json_xml_valid_case_files () -> List [Tuple [str , ...]]:
16
15
case_files_array : List [Tuple [str , ...]] = []
17
- for file in glob .glob (join ( dirname ( abspath ( __file__ )), " data/xml_json/*") ):
16
+ for file in glob .glob ("tests/ data/xml_json/*" ):
18
17
case = glob .glob (os .path .join (file , "test.*" ))
19
18
case_files_array .append (tuple (case ))
20
19
return case_files_array
21
20
22
21
23
22
def json_invalid_format_files () -> List [str ]:
24
23
case_files_array : List [str ] = []
25
- for case in glob .glob (
26
- join (dirname (abspath (__file__ )), "data/json_invalid/*/test.json" )
27
- ):
24
+ for case in glob .glob ("tests/data/json_invalid/*/test.json" ):
28
25
case_files_array .append (case )
29
26
return case_files_array
30
27
31
28
32
29
def xml_invalid_format_files () -> List [str ]:
33
30
case_files_array : List [str ] = []
34
- for case in glob .glob (
35
- join (dirname (abspath (__file__ )), "data/xml_invalid/*/test.xml" )
36
- ):
31
+ for case in glob .glob ("tests/data/xml_invalid/*/test.xml" ):
37
32
case_files_array .append (case )
38
33
return case_files_array
39
34
You can’t perform that action at this time.
0 commit comments