Skip to content

Commit 10c7ec0

Browse files
author
Jakub Ruzicka
committed
tests: enable nice py.test diffs for common test code
Rename common.py to test_common.py to enable nice py.test diffs for assertions in the common test code such as assert_distgit(). py.test does automatic assertion rewriting for collected test modules. It was a real PITA to debug failed tests without relevant .spec diffs. Change-Id: I7f8bba9549e09029f0cf8f5128a5b99df7e36b4f
1 parent 5dd6d7b commit 10c7ec0

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed
File renamed without changes.

tests/test_new_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
from rdopkg.utils.cmd import git
33
from rdopkg.utils import log
44

5-
import common
6-
from common import DIST_POSTFIX
5+
import test_common as common
6+
from test_common import DIST_POSTFIX
77
import pytest
88

99
RPM_AVAILABLE = False

tests/test_patch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
from rdopkg.utils.cmd import git
33
from rdopkg.utils import log
44

5-
import common
6-
from common import DIST_POSTFIX
5+
import test_common as common
6+
from test_common import DIST_POSTFIX
77

88
import pytest
99

tests/test_spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from rdopkg.utils import specfile
44
import pytest
55

6-
import common
6+
import test_common as common
77

88

99
def _assert_vparts(version, numeric, rest):

tests/test_update_patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from rdopkg.utils import specfile
77
import rdopkg.utils.exception
88

9-
import common
9+
import test_common as common
1010

1111

1212
def test_update_empty(tmpdir):

0 commit comments

Comments
 (0)