Skip to content

Commit

Permalink
test: changed some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaokang2022 committed Oct 25, 2024
1 parent df0b2c0 commit 4b6d4d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions tests/test_color/test_rgb.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# pylint: disable=missing-module-docstring
# pylint: disable=missing-class-docstring
# pylint: disable=missing-function-docstring
# pylint: disable=protected-access

import unittest
import platform
import unittest

from tkintertools.color import rgb

Expand Down Expand Up @@ -55,12 +54,12 @@ def test_rgb_to_str(self) -> None:
self.assertEqual(rgb.rgb_to_str((0, 0, 0)), "#000000")

def test__str_to_rgba(self) -> None:
self.assertIs(rgb._str_to_rgba, rgb._str2rgba)
self.assertIs(rgb.str_to_rgba, rgb.str2rgba)
self.assertEqual(
rgb._str_to_rgba("#00000000", reference="#FFFFFF"),
rgb.str_to_rgba("#00000000", reference="#FFFFFF"),
(255, 255, 255))
self.assertEqual(
rgb._str_to_rgba("#12345678", reference="#000000"),
rgb.str_to_rgba("#12345678", reference="#000000"),
(8, 24, 40))

def test_MAX(self) -> None:
Expand Down
9 changes: 4 additions & 5 deletions tests/test_toolbox/test_tools.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# pylint: disable=missing-module-docstring
# pylint: disable=missing-class-docstring
# pylint: disable=missing-function-docstring
# pylint: disable=protected-access

import unittest
import tkinter
import platform
import pathlib
import platform
import tkinter
import unittest

from tkintertools.toolbox import tools


class TestTrigger(unittest.TestCase):

def setUp(self) -> None:
self.t = tools._Trigger(lambda: None)
self.t = tools.Trigger(lambda: None)

def test_update(self) -> None:
self.t.reset()
Expand Down

0 comments on commit 4b6d4d4

Please sign in to comment.