Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5915a4dc
Commit
5915a4dc
authored
May 16, 2008
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make test_platform a bit more assertive (We'll see what the buildbots say.)
parent
eb8cef26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
Lib/test/test_platform.py
Lib/test/test_platform.py
+15
-4
No files found.
Lib/test/test_platform.py
View file @
5915a4dc
import
sys
import
unittest
from
test
import
test_support
import
platform
from
test
import
test_support
class
PlatformTest
(
unittest
.
TestCase
):
def
test_architecture
(
self
):
res
=
platform
.
architecture
()
...
...
@@ -49,26 +51,35 @@ class PlatformTest(unittest.TestCase):
def
test_uname
(
self
):
res
=
platform
.
uname
()
self
.
assert_
(
any
(
res
))
def
test_java_ver
(
self
):
res
=
platform
.
java_ver
()
if
sys
.
platform
==
'java'
:
self
.
assert_
(
all
(
res
))
def
test_win32_ver
(
self
):
res
=
platform
.
win32_ver
()
def
test_mac_ver
(
self
):
res
=
platform
.
mac_ver
()
try
:
import
gestalt
except
ImportError
:
pass
else
:
if
sys
.
platform
==
'darwin'
:
self
.
assert_
(
all
(
res
))
def
test_dist
(
self
):
res
=
platform
.
dist
()
def
test_libc_ver
(
self
):
from
sys
import
executable
import
os
if
os
.
path
.
isdir
(
executable
)
and
os
.
path
.
exists
(
executable
+
'.exe'
):
if
os
.
path
.
isdir
(
sys
.
executable
)
and
\
os
.
path
.
exists
(
sys
.
executable
+
'.exe'
):
# Cygwin horror
executable
=
executable
+
'.exe'
res
=
platform
.
libc_ver
(
executable
)
res
=
platform
.
libc_ver
(
sys
.
executable
)
def
test_main
():
test_support
.
run_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