Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hardik Juneja
slapos.core
Commits
630ed441
Commit
630ed441
authored
May 29, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unittest2 (we are on python 2.7 anyway)
parent
faa27004
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
16 deletions
+15
-16
setup.py
setup.py
+0
-1
slapos/tests/pyflakes/__init__.py
slapos/tests/pyflakes/__init__.py
+3
-3
slapos/tests/slapgrid.py
slapos/tests/slapgrid.py
+10
-10
slapos/tests/slapobject.py
slapos/tests/slapobject.py
+2
-2
No files found.
setup.py
View file @
630ed441
...
...
@@ -49,7 +49,6 @@ setup(name=name,
]
+
additional_install_requires
,
extra_requires
=
{
'docs'
:
(
'Sphinx'
,
'repoze.sphinx.autointerface'
),},
tests_require
=
[
'unittest2'
,
'pyflakes'
,
],
zip_safe
=
False
,
# proxy depends on Flask, which has issues with
...
...
slapos/tests/pyflakes/__init__.py
View file @
630ed441
...
...
@@ -29,9 +29,9 @@ import os
import
pkg_resources
import
pyflakes.scripts.pyflakes
import
sys
import
unittest
2
import
unittest
class
CheckCodeConsistency
(
unittest
2
.
TestCase
):
class
CheckCodeConsistency
(
unittest
.
TestCase
):
"""Lints all SlapOS Node and SLAP library code base."""
def
setUp
(
self
):
self
.
_original_argv
=
sys
.
argv
...
...
@@ -45,7 +45,7 @@ class CheckCodeConsistency(unittest2.TestCase):
def
tearDown
(
self
):
sys
.
argv
=
self
.
_original_argv
@
unittest
2
.
skip
(
'pyflakes test is disabled'
)
@
unittest
.
skip
(
'pyflakes test is disabled'
)
def
testCodeConsistency
(
self
):
if
pyflakes
.
scripts
.
pyflakes
.
main
.
func_code
.
co_argcount
:
pyflakes
.
scripts
.
pyflakes
.
main
([
...
...
slapos/tests/slapgrid.py
View file @
630ed441
...
...
@@ -36,7 +36,7 @@ import sys
import
tempfile
import
textwrap
import
time
import
unittest
2
import
unittest
import
urlparse
import
xml_marshaller
...
...
@@ -150,7 +150,7 @@ class BasicMixin:
shutil
.
rmtree
(
self
.
_tempdir
,
True
)
class
TestRequiredOnlyPartitions
(
unittest
2
.
TestCase
):
class
TestRequiredOnlyPartitions
(
unittest
.
TestCase
):
def
test_no_errors
(
self
):
required
=
[
'one'
,
'three'
]
existing
=
[
'one'
,
'two'
,
'three'
]
...
...
@@ -173,7 +173,7 @@ class TestRequiredOnlyPartitions(unittest2.TestCase):
existing
,
required
)
class
TestBasicSlapgridCP
(
BasicMixin
,
unittest
2
.
TestCase
):
class
TestBasicSlapgridCP
(
BasicMixin
,
unittest
.
TestCase
):
def
test_no_software_root
(
self
):
self
.
assertRaises
(
OSError
,
self
.
grid
.
processComputerPartitionList
)
...
...
@@ -472,7 +472,7 @@ touch worked"""):
class
TestSlapgridCPWithMaster
(
MasterMixin
,
unittest
2
.
TestCase
):
class
TestSlapgridCPWithMaster
(
MasterMixin
,
unittest
.
TestCase
):
def
test_nothing_to_do
(
self
):
...
...
@@ -749,7 +749,7 @@ exit 1
self
.
assertEqual
(
'stopped'
,
instance
.
state
)
class
TestSlapgridCPWithMasterWatchdog
(
MasterMixin
,
unittest
2
.
TestCase
):
class
TestSlapgridCPWithMasterWatchdog
(
MasterMixin
,
unittest
.
TestCase
):
def
setUp
(
self
):
MasterMixin
.
setUp
(
self
)
...
...
@@ -930,7 +930,7 @@ class TestSlapgridCPWithMasterWatchdog(MasterMixin, unittest2.TestCase):
self
.
assertEqual
(
computer
.
sequence
,
[])
class
TestSlapgridCPPartitionProcessing
(
MasterMixin
,
unittest
2
.
TestCase
):
class
TestSlapgridCPPartitionProcessing
(
MasterMixin
,
unittest
.
TestCase
):
def
test_partition_timestamp
(
self
):
computer
=
ComputerForTest
(
self
.
software_root
,
self
.
instance_root
)
...
...
@@ -1306,7 +1306,7 @@ echo %s; echo %s; exit 42""" % (line1, line2))
self
.
assertIn
(
'Failed to run buildout'
,
instance
.
error_log
)
class
TestSlapgridUsageReport
(
MasterMixin
,
unittest
2
.
TestCase
):
class
TestSlapgridUsageReport
(
MasterMixin
,
unittest
.
TestCase
):
"""
Test suite about slapgrid-ur
"""
...
...
@@ -1496,7 +1496,7 @@ class TestSlapgridUsageReport(MasterMixin, unittest2.TestCase):
class
TestSlapgridSoftwareRelease
(
MasterMixin
,
unittest
2
.
TestCase
):
class
TestSlapgridSoftwareRelease
(
MasterMixin
,
unittest
.
TestCase
):
def
test_one_software_buildout_fail_is_correctly_logged
(
self
):
"""
1. We set up a software using a corrupted buildout
...
...
@@ -1517,7 +1517,7 @@ echo %s; echo %s; exit 42""" % (line1, line2))
self
.
assertIn
(
line2
,
software
.
error_log
)
self
.
assertIn
(
'Failed to run buildout'
,
software
.
error_log
)
class
SlapgridInitialization
(
unittest
2
.
TestCase
):
class
SlapgridInitialization
(
unittest
.
TestCase
):
"""
"Abstract" class setting setup and teardown for TestSlapgridArgumentTuple
and TestSlapgridConfigurationFile.
...
...
@@ -1759,7 +1759,7 @@ binary-cache-url-blacklist =
)
class
TestSlapgridCPWithMasterPromise
(
MasterMixin
,
unittest
2
.
TestCase
):
class
TestSlapgridCPWithMasterPromise
(
MasterMixin
,
unittest
.
TestCase
):
def
test_one_failing_promise
(
self
):
computer
=
ComputerForTest
(
self
.
software_root
,
self
.
instance_root
)
instance
=
computer
.
instance_list
[
0
]
...
...
slapos/tests/slapobject.py
View file @
630ed441
...
...
@@ -27,7 +27,7 @@
import
logging
import
os
import
unittest
2
import
unittest
from
slapos.grid
import
SlapObject
from
slapos.grid
import
utils
...
...
@@ -53,7 +53,7 @@ originalBootstrapBuildout = utils.bootstrapBuildout
originalLaunchBuildout
=
utils
.
launchBuildout
originalUploadSoftwareRelease
=
SlapObject
.
Software
.
uploadSoftwareRelease
class
TestSoftwareSlapObject
(
BasicMixin
,
unittest
2
.
TestCase
):
class
TestSoftwareSlapObject
(
BasicMixin
,
unittest
.
TestCase
):
"""
Test for Software class.
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment