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
Lisa Casino
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
Hide 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,
...
@@ -49,7 +49,6 @@ setup(name=name,
]
+
additional_install_requires
,
]
+
additional_install_requires
,
extra_requires
=
{
'docs'
:
(
'Sphinx'
,
'repoze.sphinx.autointerface'
),},
extra_requires
=
{
'docs'
:
(
'Sphinx'
,
'repoze.sphinx.autointerface'
),},
tests_require
=
[
tests_require
=
[
'unittest2'
,
'pyflakes'
,
'pyflakes'
,
],
],
zip_safe
=
False
,
# proxy depends on Flask, which has issues with
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
...
@@ -29,9 +29,9 @@ import os
import
pkg_resources
import
pkg_resources
import
pyflakes.scripts.pyflakes
import
pyflakes.scripts.pyflakes
import
sys
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."""
"""Lints all SlapOS Node and SLAP library code base."""
def
setUp
(
self
):
def
setUp
(
self
):
self
.
_original_argv
=
sys
.
argv
self
.
_original_argv
=
sys
.
argv
...
@@ -45,7 +45,7 @@ class CheckCodeConsistency(unittest2.TestCase):
...
@@ -45,7 +45,7 @@ class CheckCodeConsistency(unittest2.TestCase):
def
tearDown
(
self
):
def
tearDown
(
self
):
sys
.
argv
=
self
.
_original_argv
sys
.
argv
=
self
.
_original_argv
@
unittest
2
.
skip
(
'pyflakes test is disabled'
)
@
unittest
.
skip
(
'pyflakes test is disabled'
)
def
testCodeConsistency
(
self
):
def
testCodeConsistency
(
self
):
if
pyflakes
.
scripts
.
pyflakes
.
main
.
func_code
.
co_argcount
:
if
pyflakes
.
scripts
.
pyflakes
.
main
.
func_code
.
co_argcount
:
pyflakes
.
scripts
.
pyflakes
.
main
([
pyflakes
.
scripts
.
pyflakes
.
main
([
...
...
slapos/tests/slapgrid.py
View file @
630ed441
...
@@ -36,7 +36,7 @@ import sys
...
@@ -36,7 +36,7 @@ import sys
import
tempfile
import
tempfile
import
textwrap
import
textwrap
import
time
import
time
import
unittest
2
import
unittest
import
urlparse
import
urlparse
import
xml_marshaller
import
xml_marshaller
...
@@ -150,7 +150,7 @@ class BasicMixin:
...
@@ -150,7 +150,7 @@ class BasicMixin:
shutil
.
rmtree
(
self
.
_tempdir
,
True
)
shutil
.
rmtree
(
self
.
_tempdir
,
True
)
class
TestRequiredOnlyPartitions
(
unittest
2
.
TestCase
):
class
TestRequiredOnlyPartitions
(
unittest
.
TestCase
):
def
test_no_errors
(
self
):
def
test_no_errors
(
self
):
required
=
[
'one'
,
'three'
]
required
=
[
'one'
,
'three'
]
existing
=
[
'one'
,
'two'
,
'three'
]
existing
=
[
'one'
,
'two'
,
'three'
]
...
@@ -173,7 +173,7 @@ class TestRequiredOnlyPartitions(unittest2.TestCase):
...
@@ -173,7 +173,7 @@ class TestRequiredOnlyPartitions(unittest2.TestCase):
existing
,
required
)
existing
,
required
)
class
TestBasicSlapgridCP
(
BasicMixin
,
unittest
2
.
TestCase
):
class
TestBasicSlapgridCP
(
BasicMixin
,
unittest
.
TestCase
):
def
test_no_software_root
(
self
):
def
test_no_software_root
(
self
):
self
.
assertRaises
(
OSError
,
self
.
grid
.
processComputerPartitionList
)
self
.
assertRaises
(
OSError
,
self
.
grid
.
processComputerPartitionList
)
...
@@ -472,7 +472,7 @@ touch worked"""):
...
@@ -472,7 +472,7 @@ touch worked"""):
class
TestSlapgridCPWithMaster
(
MasterMixin
,
unittest
2
.
TestCase
):
class
TestSlapgridCPWithMaster
(
MasterMixin
,
unittest
.
TestCase
):
def
test_nothing_to_do
(
self
):
def
test_nothing_to_do
(
self
):
...
@@ -749,7 +749,7 @@ exit 1
...
@@ -749,7 +749,7 @@ exit 1
self
.
assertEqual
(
'stopped'
,
instance
.
state
)
self
.
assertEqual
(
'stopped'
,
instance
.
state
)
class
TestSlapgridCPWithMasterWatchdog
(
MasterMixin
,
unittest
2
.
TestCase
):
class
TestSlapgridCPWithMasterWatchdog
(
MasterMixin
,
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
MasterMixin
.
setUp
(
self
)
MasterMixin
.
setUp
(
self
)
...
@@ -930,7 +930,7 @@ class TestSlapgridCPWithMasterWatchdog(MasterMixin, unittest2.TestCase):
...
@@ -930,7 +930,7 @@ class TestSlapgridCPWithMasterWatchdog(MasterMixin, unittest2.TestCase):
self
.
assertEqual
(
computer
.
sequence
,
[])
self
.
assertEqual
(
computer
.
sequence
,
[])
class
TestSlapgridCPPartitionProcessing
(
MasterMixin
,
unittest
2
.
TestCase
):
class
TestSlapgridCPPartitionProcessing
(
MasterMixin
,
unittest
.
TestCase
):
def
test_partition_timestamp
(
self
):
def
test_partition_timestamp
(
self
):
computer
=
ComputerForTest
(
self
.
software_root
,
self
.
instance_root
)
computer
=
ComputerForTest
(
self
.
software_root
,
self
.
instance_root
)
...
@@ -1306,7 +1306,7 @@ echo %s; echo %s; exit 42""" % (line1, line2))
...
@@ -1306,7 +1306,7 @@ echo %s; echo %s; exit 42""" % (line1, line2))
self
.
assertIn
(
'Failed to run buildout'
,
instance
.
error_log
)
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
Test suite about slapgrid-ur
"""
"""
...
@@ -1496,7 +1496,7 @@ class TestSlapgridUsageReport(MasterMixin, unittest2.TestCase):
...
@@ -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
):
def
test_one_software_buildout_fail_is_correctly_logged
(
self
):
"""
"""
1. We set up a software using a corrupted buildout
1. We set up a software using a corrupted buildout
...
@@ -1517,7 +1517,7 @@ echo %s; echo %s; exit 42""" % (line1, line2))
...
@@ -1517,7 +1517,7 @@ echo %s; echo %s; exit 42""" % (line1, line2))
self
.
assertIn
(
line2
,
software
.
error_log
)
self
.
assertIn
(
line2
,
software
.
error_log
)
self
.
assertIn
(
'Failed to run buildout'
,
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
"Abstract" class setting setup and teardown for TestSlapgridArgumentTuple
and TestSlapgridConfigurationFile.
and TestSlapgridConfigurationFile.
...
@@ -1759,7 +1759,7 @@ binary-cache-url-blacklist =
...
@@ -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
):
def
test_one_failing_promise
(
self
):
computer
=
ComputerForTest
(
self
.
software_root
,
self
.
instance_root
)
computer
=
ComputerForTest
(
self
.
software_root
,
self
.
instance_root
)
instance
=
computer
.
instance_list
[
0
]
instance
=
computer
.
instance_list
[
0
]
...
...
slapos/tests/slapobject.py
View file @
630ed441
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
import
logging
import
logging
import
os
import
os
import
unittest
2
import
unittest
from
slapos.grid
import
SlapObject
from
slapos.grid
import
SlapObject
from
slapos.grid
import
utils
from
slapos.grid
import
utils
...
@@ -53,7 +53,7 @@ originalBootstrapBuildout = utils.bootstrapBuildout
...
@@ -53,7 +53,7 @@ originalBootstrapBuildout = utils.bootstrapBuildout
originalLaunchBuildout
=
utils
.
launchBuildout
originalLaunchBuildout
=
utils
.
launchBuildout
originalUploadSoftwareRelease
=
SlapObject
.
Software
.
uploadSoftwareRelease
originalUploadSoftwareRelease
=
SlapObject
.
Software
.
uploadSoftwareRelease
class
TestSoftwareSlapObject
(
BasicMixin
,
unittest
2
.
TestCase
):
class
TestSoftwareSlapObject
(
BasicMixin
,
unittest
.
TestCase
):
"""
"""
Test for Software class.
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