Skip to content

Commit

Permalink
test: Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaokang2022 committed Jan 7, 2025
1 parent 71386ff commit 53d9b16
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y xvfb
Xvfb :99 -screen 0 1280x1024x24 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Lint with pylint
run: pylint $(git ls-files "*.py")
Expand Down
9 changes: 0 additions & 9 deletions tests/test_core/test_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,6 @@ def test_transparentcolor(self) -> None:
self.assertIsNone(tk.transparentcolor(""))
self.assertEqual(tk.transparentcolor(), None)

@unittest.skipUnless(platform.system() == "Darwin", "Only works on Darwin")
def test_transparent(self) -> None:
with containers.Tk() as tk:
self.assertEqual(tk.transparent(), None)
self.assertIsNone(tk.transparent("red"))
self.assertEqual(str(tk.transparent()), "red")
self.assertIsNone(tk.transparent(""))
self.assertEqual(tk.transparent(), None)

def test_center(self) -> None:
with containers.Tk() as tk:
tk.center()
Expand Down
12 changes: 0 additions & 12 deletions tkintertools/core/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,18 +284,6 @@ def transparentcolor(self, value: str | None = None) -> str | None:
result = self.wm_attributes("-transparentcolor", value)
return None if result == "" else result

elif platform.system() == "Darwin":

def transparent(self, value: str | None = None) -> str | None:
"""Set or get the penetration color of the window
* `value`: the penetration color of the window
This method only works on Darwin!
"""
result = self.wm_attributes("-transparent", value)
return None if result == "" else result

@typing_extensions.override
def destroy(self) -> None:
"""Destroy this and all descendants widgets."""
Expand Down

0 comments on commit 53d9b16

Please sign in to comment.