mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-24 18:06:42 +02:00
TW-1441
- TW-1441 task import continues happily if filename doesn't exist.
This commit is contained in:
parent
18581a6ca4
commit
5275c0ce60
10 changed files with 44 additions and 3 deletions
30
test/tw-1441.t
Executable file
30
test/tw-1441.t
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env python2.7
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
# Ensure python finds the local simpletap module
|
||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
from basetest import Task, TestCase
|
||||
|
||||
|
||||
class TestBug1441(TestCase):
|
||||
def setUp(self):
|
||||
self.t = Task()
|
||||
|
||||
def test_import_filename(self):
|
||||
"""import fails if file doesn't exist"""
|
||||
command = ("import", "somefile", "otherfile")
|
||||
code, out, err = self.t.runError(command)
|
||||
|
||||
self.assertIn("File 'somefile' not found.", err)
|
||||
self.assertIn("File 'otherfile' not found.", err)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from simpletap import TAPTestRunner
|
||||
unittest.main(testRunner=TAPTestRunner())
|
||||
|
||||
# vim: ai sts=4 et sw=4
|
Loading…
Add table
Add a link
Reference in a new issue