mirror of
https://github.com/rpm-software-management/tito.git
synced 2025-02-23 12:12:47 +00:00
Move is_rawhide and is_epel6 definitions to __init__ so other tests can use it
This commit is contained in:
parent
f71033d7ce
commit
a72d4fbe50
2 changed files with 9 additions and 9 deletions
|
@ -25,15 +25,7 @@ from os.path import join
|
|||
from tito.common import run_command
|
||||
from tito.compat import * # NOQA
|
||||
from functional.fixture import TitoGitTestFixture, tito
|
||||
from unit import Capture
|
||||
|
||||
|
||||
# There is not many simple options to check on what distribution this is running.
|
||||
# Fortunately, we only need to check for Fedora Rawhide and EPEL6, so we can
|
||||
# determine it from python version. This is compatible for all distributions.
|
||||
import sys
|
||||
is_rawhide = sys.version_info[:2] >= (3, 8)
|
||||
is_epel6 = sys.version_info[:2] == (2, 6)
|
||||
from unit import Capture, is_epel6, is_rawhide
|
||||
|
||||
if is_epel6:
|
||||
import unittest2 as unittest
|
||||
|
|
|
@ -17,6 +17,14 @@ from contextlib import contextmanager
|
|||
from mock import patch, MagicMock
|
||||
from tito.compat import PY2, StringIO
|
||||
|
||||
|
||||
# There is not many simple options to check on what distribution this is running.
|
||||
# Fortunately, we only need to check for Fedora Rawhide and EPEL6, so we can
|
||||
# determine it from python version. This is compatible for all distributions.
|
||||
is_rawhide = sys.version_info[:2] >= (3, 8)
|
||||
is_epel6 = sys.version_info[:2] == (2, 6)
|
||||
|
||||
|
||||
file_spec = None
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue