File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ python = "3.11"
47
47
[tool .hatch .envs .test ]
48
48
features = [" test" ]
49
49
[tool .hatch .envs .test .scripts ]
50
- test = " pytest"
50
+ run = " pytest -v {args} "
51
51
52
52
[tool .pytest .ini_options ]
53
53
addopts = [
@@ -59,11 +59,9 @@ addopts = [
59
59
filterwarnings = [" error" ]
60
60
61
61
[tool .black ]
62
- target-version = [" py310" ] # py311 not supported yet
63
62
line-length = 120
64
63
65
64
[tool .ruff ]
66
- target-version = " py311"
67
65
line-length = 120
68
66
allowed-confusables = [" ’" , " ×" ]
69
67
select = [
Original file line number Diff line number Diff line change 1
1
import json
2
2
from dataclasses import dataclass
3
3
from typing import cast
4
+ from warnings import catch_warnings , filterwarnings
4
5
5
6
import pytest
6
7
from git import Commit , Diff
@@ -28,8 +29,11 @@ class MockRelease:
28
29
@pytest .fixture
29
30
def con (response_mock ) -> GitHubConnection :
30
31
resp = json .dumps ({"login" : "scverse-bot" })
31
- with response_mock (f"GET https://api.github.com:443/users/scverse-bot -> 200 :{ resp } " ):
32
- return GitHubConnection ("scverse-bot" )
32
+ with catch_warnings ():
33
+ # https://github.com/idlesign/pytest-responsemock/issues/7
34
+ filterwarnings ("ignore" , category = ResourceWarning )
35
+ with response_mock (f"GET https://api.github.com:443/users/scverse-bot -> 200 :{ resp } " ):
36
+ return GitHubConnection ("scverse-bot" )
33
37
34
38
35
39
@pytest .fixture
You can’t perform that action at this time.
0 commit comments