Skip to content

Commit

Permalink
Less verbose message in COT_UT about diff skip in 2.6. Renamed 'platf…
Browse files Browse the repository at this point in the history
…orm.py' to 'platforms.py' to avoid conflict with system 'platform' module.
  • Loading branch information
glennmatthews committed Jan 22, 2015
1 parent 3d12dd0 commit 5600021
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion COT/ovf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from .data_validation import natural_sort, match_or_die, check_for_conflict
from .data_validation import ValueTooHighError, ValueUnsupportedError
from .helper_tools import get_checksum, get_disk_capacity, convert_disk_image
import COT.platform as Platform
import COT.platforms as Platform
from .cli import TEXT_WIDTH

logger = logging.getLogger(__name__)
Expand Down
4 changes: 2 additions & 2 deletions COT/platform.py → COT/platforms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#
# platform.py - Module for methods related to variations between
# guest platforms (Cisco CSR1000V, Cisco IOS XRv, etc.)
# platforms.py - Module for methods related to variations between
# guest platforms (Cisco CSR1000V, Cisco IOS XRv, etc.)
#
# October 2013, Glenn F. Matthews
# Copyright (c) 2013-2015 the COT project developers.
Expand Down
4 changes: 2 additions & 2 deletions COT/tests/edit_hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# edit_hardware.py - test cases for the COTEditHardware class
#
# December 2014, Glenn F. Matthews
# Copyright (c) 2013-2014 the COT project developers.
# Copyright (c) 2013-2015 the COT project developers.
# See the COPYRIGHT.txt file at the top-level directory of this distribution
# and at https://github.com/glennmatthews/cot/blob/master/COPYRIGHT.txt.
#
Expand All @@ -20,7 +20,7 @@
from COT.ui_shared import UI
from COT.edit_hardware import COTEditHardware
from COT.data_validation import InvalidInputError
from COT.platform import IOSv, IOSXRv
from COT.platforms import IOSv, IOSXRv


class TestCOTEditHardware(COT_UT):
Expand Down
2 changes: 1 addition & 1 deletion COT/tests/inject_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from COT.ui_shared import UI
from COT.inject_config import COTInjectConfig
from COT.data_validation import InvalidInputError
from COT.platform import IOSv, IOSXRv, IOSXRvLC
from COT.platforms import IOSv, IOSXRv, IOSXRvLC


class TestCOTInjectConfig(COT_UT):
Expand Down
4 changes: 2 additions & 2 deletions COT/tests/platform.py → COT/tests/platforms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform.py - Unit test cases for COT platform handling
# platforms.py - Unit test cases for COT platform handling
#
# January 2014, Glenn F. Matthews
# Copyright (c) 2014-2015 the COT project developers.
Expand All @@ -13,7 +13,7 @@
# distributed except according to the terms contained in the LICENSE.txt file.

import unittest
from COT.platform import IOSXRv, CSR1000V, IOSv, NXOSv, IOSXRvRP, IOSXRvLC
from COT.platforms import IOSXRv, CSR1000V, IOSv, NXOSv, IOSXRvRP, IOSXRvLC
from COT.data_validation import ValueUnsupportedError
from COT.data_validation import ValueTooLowError, ValueTooHighError

Expand Down
4 changes: 3 additions & 1 deletion COT/tests/ut.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import shutil
import re
import sys
import platform
import time
import logging
from verboselogs import VerboseLogger
Expand Down Expand Up @@ -60,7 +61,8 @@ def check_diff(self, expected, file1=None, file2=None):

if re.search("ovf", file1) and sys.hexversion < 0x02070000:
print("OVF file diff comparison skipped "
"due to old Python version ({0})".format(sys.version))
"due to old Python version ({0})"
.format(platform.python_version()))
return

with open(file1) as f1:
Expand Down

0 comments on commit 5600021

Please sign in to comment.