|
|
@ -0,0 +1,27 @@ |
|
|
|
import unittest |
|
|
|
from argparse import ArgumentParser |
|
|
|
|
|
|
|
from tests.harness import instrumentGooey |
|
|
|
|
|
|
|
|
|
|
|
class TestGooeyApplication(unittest.TestCase): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def testFullscreen(self): |
|
|
|
parser = self.basicParser() |
|
|
|
for shouldShow in [True, False]: |
|
|
|
with self.subTest('Should set full screen: {}'.format(shouldShow)): |
|
|
|
with instrumentGooey(parser, fullscreen=shouldShow) as (app, gapp): |
|
|
|
self.assertEqual(gapp.IsFullScreen(), shouldShow) |
|
|
|
|
|
|
|
def basicParser(self): |
|
|
|
parser = ArgumentParser() |
|
|
|
parser.add_argument('--foo') |
|
|
|
return parser |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
unittest.main() |