13
13
14
14
15
15
def test_gh_not_in_actions (monkeypatch : MonkeyPatch , tox_project : ToxProjectCreator ) -> None :
16
+ monkeypatch .delenv ("GITHUB_ACTIONS" , raising = False )
17
+ project = tox_project ({"tox.ini" : "[testenv]\n package=skip" })
18
+ result = project .run ("-vv" )
19
+ result .assert_success ()
20
+ assert "tox-gh won't override envlist because tox is not running in GitHub Actions" in result .out
21
+
22
+
23
+ def test_gh_not_in_actions_quiet (monkeypatch : MonkeyPatch , tox_project : ToxProjectCreator ) -> None :
16
24
monkeypatch .delenv ("GITHUB_ACTIONS" , raising = False )
17
25
project = tox_project ({"tox.ini" : "[testenv]\n package=skip" })
18
26
result = project .run ()
19
27
result .assert_success ()
20
- assert "ROOT: tox-gh won't override envlist because tox is not running in GitHub Actions" in result .out
28
+ assert "tox-gh won't override envlist because tox is not running in GitHub Actions" not in result .out
21
29
22
30
23
31
def test_gh_e_flag_set (monkeypatch : MonkeyPatch , tox_project : ToxProjectCreator ) -> None :
24
32
monkeypatch .setenv ("GITHUB_ACTIONS" , "true" )
25
33
monkeypatch .delenv ("TOXENV" , raising = False )
26
34
project = tox_project ({"tox.ini" : "[testenv]\n package=skip" })
27
- result = project .run ("-e" , "py" )
35
+ result = project .run ("-e" , "py" , "-vv" )
28
36
result .assert_success ()
29
37
assert "tox-gh won't override envlist because envlist is explicitly given via -e flag" in result .out
30
38
@@ -33,7 +41,7 @@ def test_gh_toxenv_set(monkeypatch: MonkeyPatch, tox_project: ToxProjectCreator)
33
41
monkeypatch .setenv ("GITHUB_ACTIONS" , "true" )
34
42
monkeypatch .setenv ("TOXENV" , "py" )
35
43
project = tox_project ({"tox.ini" : "[testenv]\n package=skip" })
36
- result = project .run ()
44
+ result = project .run ("-vv" )
37
45
result .assert_success ()
38
46
assert "tox-gh won't override envlist because envlist is explicitly given via TOXENV" in result .out
39
47
0 commit comments