Skip to content

Commit 39d21a6

Browse files
committed
Import Cleanups
1 parent f1fb4b9 commit 39d21a6

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

tests/features/test_cname_main.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import sys
22
import types
33
import logging
4-
import builtins
54
import pytest
65

76
import gardenlinux.features.cname_main as cname_main
87

98

109
def test_main_happy(monkeypatch, capsys):
10+
"""
11+
Test the "Happy Path" of the main() function.
12+
"""
1113
# Arrange
1214
argv = ["prog", "--arch", "amd64", "--version", "1.0-abc123", "flav-amd64"]
1315
monkeypatch.setattr(sys, "argv", argv)
@@ -47,6 +49,9 @@ def sort_graph_nodes(graph):
4749

4850

4951
def test_main_version_from_file(monkeypatch, capsys):
52+
"""
53+
"Happy Path" test for grabbing the version and commit id from file in main().
54+
"""
5055
# Arrange
5156
argv = ["prog", "--arch", "amd64", "flav-amd64"]
5257
monkeypatch.setattr(sys, "argv", argv)
@@ -139,7 +144,7 @@ def sort_graph_nodes(graph):
139144
assert "Failed to parse version information" in caplog.text
140145

141146

142-
def test_cname_main_invalid_cname(monkeypatch):
147+
def test_cname_main_invalid_cname_raises(monkeypatch):
143148
"""
144149
Test if AssertionError is raised with an invalid or malformed cname.
145150
"""
@@ -152,7 +157,7 @@ def test_cname_main_invalid_cname(monkeypatch):
152157
cname_main.main()
153158

154159

155-
def test_cname_main_missing_arch_in_cname(monkeypatch):
160+
def test_cname_main_missing_arch_in_cname_raises(monkeypatch):
156161
"""
157162
Test if an assertion error is raised when the arch argument is missing.
158163
"""

tests/features/test_main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import builtins
2-
import io
31
import sys
42
import types
53
import pytest

0 commit comments

Comments
 (0)