20 lines
725 B
Python
20 lines
725 B
Python
|
# Copyright 2022 (c) Anna Schumaker.
|
||
|
"""Test setup of the Emmental command line options."""
|
||
|
import unittest
|
||
|
import gi
|
||
|
import emmental.options
|
||
|
|
||
|
|
||
|
class TestOptions(unittest.TestCase):
|
||
|
"""Test case for our various command line options."""
|
||
|
|
||
|
def test_version(self):
|
||
|
"""Check that the version option is set up properly."""
|
||
|
opt = emmental.options.Version
|
||
|
self.assertIsInstance(opt, gi.repository.GLib.OptionEntry)
|
||
|
self.assertEqual(opt.long_name, "version")
|
||
|
self.assertEqual(opt.short_name, ord("v"))
|
||
|
self.assertEqual(opt.flags, gi.repository.GLib.OptionFlags.NONE)
|
||
|
self.assertEqual(opt.arg, gi.repository.GLib.OptionArg.NONE)
|
||
|
self.assertEqual(opt.arg_data, 0)
|