Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Alain Takoudjou
erp5
Commits
dba1a129
Commit
dba1a129
authored
Feb 05, 2019
by
Bryton Lacquement
🚪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! erp5.util: add support for Python 3
Undo accidental revert
parent
90d37ca8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
erp5/tests/testERP5TestNode.py
erp5/tests/testERP5TestNode.py
+19
-5
No files found.
erp5/tests/testERP5TestNode.py
View file @
dba1a129
...
...
@@ -489,21 +489,35 @@ shared = true
test_node
.
purgeOldTestSuite
(
test_suite_data
)
self
.
assertEquals
([
'foo'
],
os
.
listdir
(
self
.
working_directory
))
def
test_purgeOldTestSuiteChmod
(
self
):
def
test_purgeOldTestSuiteChmod
NonWriteable
(
self
):
"""Old test suites can be deleted even when some files/directories have
been chmod'd to make
read only.
"""
been chmod'd to make
non-writeable
"""
test_node
=
self
.
getTestNode
()
test_suite_data
=
self
.
getTestSuiteData
(
add_third_repository
=
True
)
os
.
mkdir
(
os
.
path
.
join
(
self
.
working_directory
,
'bar'
))
non_writable_file
=
open
(
os
.
path
.
join
(
self
.
working_directory
,
'bar'
,
'non-writable-file'
),
'w'
)
non_writable_file
.
close
()
# make this file and directory non writeable
os
.
chmod
(
os
.
path
.
join
(
self
.
working_directory
,
'bar'
,
'non-writable-file'
),
0o
000
)
os
.
chmod
(
os
.
path
.
join
(
self
.
working_directory
,
'bar'
),
0o
000
)
os
.
chmod
(
os
.
path
.
join
(
self
.
working_directory
,
'bar'
,
'non-writable-file'
),
0o
400
)
# -r--------
os
.
chmod
(
os
.
path
.
join
(
self
.
working_directory
,
'bar'
),
0o
500
)
# dr-x------
test_node
.
purgeOldTestSuite
(
test_suite_data
)
# should not fail
self
.
assertEqual
([],
os
.
listdir
(
self
.
working_directory
))
def
test_purgeOldTestSuiteChmodNonWriteableNonReadable
(
self
):
"""Old test suites can be deleted even when some files/directories have
been chmod'd to make them non readable and non writeable. """
test_node
=
self
.
getTestNode
()
test_suite_data
=
self
.
getTestSuiteData
(
add_third_repository
=
True
)
os
.
mkdir
(
os
.
path
.
join
(
self
.
working_directory
,
'bar'
))
non_writable_file
=
open
(
os
.
path
.
join
(
self
.
working_directory
,
'bar'
,
'non-writable-file'
),
'w'
)
non_writable_file
.
close
()
os
.
chmod
(
os
.
path
.
join
(
self
.
working_directory
,
'bar'
,
'non-writable-file'
),
0o000
)
# ----------
os
.
chmod
(
os
.
path
.
join
(
self
.
working_directory
,
'bar'
),
0o000
)
# d---------
test_node
.
purgeOldTestSuite
(
test_suite_data
)
# should not fail
self
.
assertEqual
([],
os
.
listdir
(
self
.
working_directory
))
def
test_09_runTestSuite
(
self
,
my_test_type
=
'UnitTest'
):
"""
...
...
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