mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Merge branch '212-fix-help-handling' of git://github.com/sruffell/timewarrior into sruffell-212-fix-help-handling
This commit is contained in:
commit
6bb4f981cb
2 changed files with 24 additions and 3 deletions
10
test/help.t
10
test/help.t
|
@ -30,15 +30,13 @@ import os
|
|||
import sys
|
||||
import unittest
|
||||
|
||||
from datetime import datetime, timedelta, time
|
||||
|
||||
# Ensure python finds the local simpletap module
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from basetest import Timew, TestCase
|
||||
|
||||
|
||||
class TestStart(TestCase):
|
||||
class TestHelp(TestCase):
|
||||
def setUp(self):
|
||||
"""Executed before each test in the class"""
|
||||
self.t = Timew()
|
||||
|
@ -58,6 +56,12 @@ class TestStart(TestCase):
|
|||
code, out, err = self.t("help bogus")
|
||||
self.assertRegexpMatches(out, r"No help available for 'bogus'")
|
||||
|
||||
def test_command_with_help_long_option_should_show_help_page(self):
|
||||
"""timew command with --help should show help page"""
|
||||
code, out1, err1 = self.t("help track")
|
||||
code, out2, err2 = self.t("track --help")
|
||||
self.assertEquals(out1, out2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue