mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Use local man pages in tests
We need to set the value of `MANPATH` to the local man pages when running helper function 'run_cmd_wait_nofail'. Use the already set Timewarrior environment for this. Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
57695d27f4
commit
70a1082224
2 changed files with 4 additions and 2 deletions
|
@ -64,14 +64,14 @@ class TestHelp(TestCase):
|
|||
|
||||
def test_help_with_command_should_show_man_page(self):
|
||||
"""timew help with command should show man page"""
|
||||
_, expected, _ = run_cmd_wait_nofail(["man", "timew-start"])
|
||||
_, expected, _ = run_cmd_wait_nofail(["man", "timew-start"], env=self.t.env)
|
||||
_, actual, _ = self.t("help start")
|
||||
|
||||
self.assertEqual(actual, expected)
|
||||
|
||||
def test_help_with_unknown_argument_should_show_error_message(self):
|
||||
"""timew help with unknown argument should show error message"""
|
||||
_, _, expected = run_cmd_wait_nofail(["man", "timew-bogus"])
|
||||
_, _, expected = run_cmd_wait_nofail(["man", "timew-bogus"], env=self.t.env)
|
||||
_, _, actual = self.t.runError("help bogus")
|
||||
|
||||
self.assertEqual(actual, expected)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue