import unittest, sys
from rlextra.graphics.guiedit import mutils
from reportlab.lib.testutils import makeSuiteForClasses
try:
    import tkinter, tkinter.filedialog as tkFileDialog, tkinter.messagebox as tkMessageBox, tkinter.font as tkFont
except ImportError:
    try:
        import Tkinter as tkinter, tkFileDialog, tkMessageBox, tkFont
    except ImportError:
        tkinter = None

class ImportingTestCase(unittest.TestCase):
    def test_importing_all(self):
        FAILS=[]
        M=mutils.getModules(
                    P=['reportlab.lib', 'reportlab', 'rlextra'],
                    X=[] if tkinter else "rlextra.graphics.guiedit.guiedit rlextra.graphics.guiedit.guidialogs",
                    FAILS=FAILS,
                    allowCompiled=False,
                    )
        assert not FAILS,'Could not import modules\n %s' % ' \n'.join(FAILS)

def makeSuite():
    return makeSuiteForClasses(ImportingTestCase)

#noruntests
if __name__ == "__main__":
    unittest.TextTestRunner().run(makeSuite())
