Skip to content

Commit fef76d9

Browse files
committed
refactor(tests): 修复代码
1 parent b240ba0 commit fef76d9

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/ttk_text/scrolled_text.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from tkinter import Text
21
from tkinter.ttk import Frame, Scrollbar
32
from typing import Optional
43

tests/conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@pytest.fixture(scope="session")
55
def app():
66
import tkinter as tk
7+
78
root = tk.Tk()
89
yield root
910
root.destroy()
@@ -12,12 +13,14 @@ def app():
1213
@pytest.fixture(scope="session")
1314
def style(app):
1415
from tkinter.ttk import Style
16+
1517
yield Style(app)
1618

1719

1820
@pytest.fixture
1921
def themed_text(app):
2022
from ttk_text import ThemedText
23+
2124
text = ThemedText(app)
2225
text.pack()
2326
yield text
@@ -28,6 +31,7 @@ def themed_text(app):
2831
@pytest.fixture
2932
def themed_texts(app):
3033
from ttk_text import ThemedText
34+
3135
text1 = ThemedText(app)
3236
text1.pack()
3337
text2 = ThemedText(app)
@@ -42,6 +46,7 @@ def themed_texts(app):
4246
@pytest.fixture
4347
def scrolled_text(app):
4448
from ttk_text.scrolled_text import ScrolledText
49+
4550
text = ScrolledText(app, vertical=True, horizontal=True)
4651
text.pack()
4752
yield text

0 commit comments

Comments
 (0)