Merge ~adam-collard/maas-ci/+git/system-tests:cog-refactor into ~maas-committers/maas-ci/+git/system-tests:master

Proposed by Adam Collard
Status: Merged
Approved by: Adam Collard
Approved revision: e6b98c785362dab71155711dc7649a95b8906765
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~adam-collard/maas-ci/+git/system-tests:cog-refactor
Merge into: ~maas-committers/maas-ci/+git/system-tests:master
Diff against target: 52 lines (+10/-14)
1 file modified
tox.ini (+10/-14)
Reviewer Review Type Date Requested Status
MAAS Lander Approve
Jack Lloyd-Walters Approve
Review via email: mp+428604@code.launchpad.net

Commit message

Minor refactor of cog sections to reuse code

To post a comment you must log in.
Revision history for this message
Jack Lloyd-Walters (lloydwaltersj) wrote :

+1

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b cog-refactor lp:~adam-collard/maas-ci/+git/system-tests into -b master lp:~maas-committers/maas-ci/+git/system-tests

STATUS: SUCCESS
COMMIT: e6b98c785362dab71155711dc7649a95b8906765

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/tox.ini b/tox.ini
2index b96b656..a1d75c5 100644
3--- a/tox.ini
4+++ b/tox.ini
5@@ -29,7 +29,15 @@ commands=
6 #[[[cog
7 #import cog
8 #from pathlib import Path
9+#import sys
10 #import yaml
11+## Used further down the file
12+#if sys.version_info < (3, 9):
13+# print("Detected Python < 3.9; forcing basepython to 3.9")
14+# BASEPYTHON = "python3.9"
15+#else:
16+# print("Detected Python >= 3.9, no basepython needed")
17+# BASEPYTHON = None
18 #config_yaml = Path("config.yaml")
19 #if config_yaml.exists():
20 # config = yaml.safe_load(config_yaml.open())
21@@ -81,14 +89,8 @@ commands=
22
23 [testenv:generate_config]
24 #[[[cog
25-#import cog
26-#import sys
27-#basepython = None
28-#if sys.version_info < (3, 9):
29-# print("Detected Python < 3.9; forcing basepython to 3.9")
30+#if BASEPYTHON:
31 # cog.outl("basepython = python3.9")
32-#else:
33-# print("Detected Python >= 3.9, no basepython needed")
34 #]]]
35 #[[[end]]]
36 description=Generate config.yaml
37@@ -98,14 +100,8 @@ commands=python utils/gen_config.py {posargs}
38
39 [testenv:filter_envs]
40 #[[[cog
41-#import cog
42-#import sys
43-#basepython = None
44-#if sys.version_info < (3, 9):
45-# print("Detected Python < 3.9; forcing basepython to 3.9")
46+#if BASEPYTHON:
47 # cog.outl("basepython = python3.9")
48-#else:
49-# print("Detected Python >= 3.9, no basepython needed")
50 #]]]
51 #[[[end]]]
52 description=Filter environments by valid tox ones.

Subscribers

People subscribed via source and target branches

to all changes: