Issue #21477: Idle htest: merge and modify run and runall; add many tests.
Patch by Saimadhav Heblikar
diff --git a/Lib/idlelib/tabbedpages.py b/Lib/idlelib/tabbedpages.py
index 8d7113d..0723d94 100644
--- a/Lib/idlelib/tabbedpages.py
+++ b/Lib/idlelib/tabbedpages.py
@@ -467,9 +467,12 @@
 
         self._tab_set.set_selected_tab(page_name)
 
-if __name__ == '__main__':
+def _tabbed_pages(parent):
     # test dialog
     root=Tk()
+    width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
+    root.geometry("+%d+%d"%(x, y + 175))
+    root.title("Test tabbed pages")
     tabPage=TabbedPageSet(root, page_names=['Foobar','Baz'], n_rows=0,
                           expand_tabs=False,
                           )
@@ -488,3 +491,8 @@
     labelPgName.pack(padx=5)
     entryPgName.pack(padx=5)
     root.mainloop()
+
+
+if __name__ == '__main__':
+    from idlelib.idle_test.htest import run
+    run(_tabbed_pages)