emmental/tests/test_options.py
Anna Schumaker 4072ea97d4 emmental3.py: Start Emmental 3.0
I'm going to put all of the main source code into a single subdirectory
under emmental/ and separate out tests into a separate tests/ directory.

Additionally, I have switched over to pytest for running tests to give
me better output (with color!)

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2023-03-07 11:18:46 -05:00

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)