Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit edcd32d

Browse filesBrowse files
committed
Check tcltk for any platform and version
1 parent 045abfc commit edcd32d
Copy full SHA for edcd32d

File tree

Expand file treeCollapse file tree

2 files changed

+10
-12
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-12
lines changed

‎tests/python-tests.ps1

Copy file name to clipboardExpand all lines: tests/python-tests.ps1
+7-8Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ Describe "Tests" {
4949
"python ./sources/simple-test.py" | Should -ReturnZeroExitCode
5050
}
5151

52+
# linux has no display name and no $DISPLAY environment variable - skip tk test
53+
if (-not (($Platform -match "ubuntu") -or ($Platform -match "linux"))) {
54+
It "Check if tcl/tk has the same headed and library versions" {
55+
"python ./sources/tcltk.py" | Should -ReturnZeroExitCode
56+
}
57+
}
58+
5259
if (($Version -ge "3.2.0") -and -not ([semver]"$($Version.Major).$($Version.Minor)" -eq [semver]"3.11" -and $Version.PreReleaseLabel)) {
5360
It "Check if sqlite3 module is installed" {
5461
"python ./sources/python-sqlite3.py" | Should -ReturnZeroExitCode
@@ -89,12 +96,4 @@ Describe "Tests" {
8996
"./dist/simple-test" | Should -ReturnZeroExitCode
9097
}
9198
}
92-
93-
if (($Platform -match "macos") -or ($Platform -match "darwin")) {
94-
if ($Version -gt "3.7.12" ) {
95-
It "Check if python above 3.7.12 use tcl/tk v8.6" {
96-
"python ./sources/tcltk-86.py" | Should -ReturnZeroExitCode
97-
}
98-
}
99-
}
10099
}

‎tests/sources/tcltk-86.py renamed to ‎tests/sources/tcltk.py

Copy file name to clipboardExpand all lines: tests/sources/tcltk.py
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
header = _tkinter.TK_VERSION
55
lib = tkinter.Tk().getvar('tk_version')
66

7-
print('header version=' + header)
8-
print('lib version=' + lib)
9-
10-
if lib != '8.6' or header != '8.6':
7+
if lib != header:
8+
print('header version=' + header)
9+
print('lib version=' + lib)
1110
exit(1)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.