mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Use double quotes
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
601050ae1f
commit
8103d49e52
4 changed files with 8 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
import signal
|
import signal
|
||||||
|
|
||||||
sig_names = dict((k, v) for v, k in reversed(sorted(signal.__dict__.items()))
|
sig_names = dict((k, v) for v, k in reversed(sorted(signal.__dict__.items()))
|
||||||
if v.startswith('SIG') and not v.startswith('SIG_'))
|
if v.startswith("SIG") and not v.startswith("SIG_"))
|
||||||
|
|
||||||
|
|
||||||
class CommandError(Exception):
|
class CommandError(Exception):
|
||||||
|
|
|
@ -7,7 +7,7 @@ class BaseTestCase(unittest.TestCase):
|
||||||
def tap(self, out):
|
def tap(self, out):
|
||||||
sys.stderr.write("--- tap output start ---\n")
|
sys.stderr.write("--- tap output start ---\n")
|
||||||
for line in out.splitlines():
|
for line in out.splitlines():
|
||||||
sys.stderr.write(line + '\n')
|
sys.stderr.write(line + "\n")
|
||||||
sys.stderr.write("--- tap output end ---\n")
|
sys.stderr.write("--- tap output end ---\n")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,8 @@ class Timew(object):
|
||||||
# Configuration of the isolated environment
|
# Configuration of the isolated environment
|
||||||
self._original_pwd = os.getcwd()
|
self._original_pwd = os.getcwd()
|
||||||
self.datadir = tempfile.mkdtemp(prefix="timew_")
|
self.datadir = tempfile.mkdtemp(prefix="timew_")
|
||||||
self.timewrc = os.path.join (self.datadir, 'timewarrior.cfg')
|
self.timewrc = os.path.join(self.datadir, "timewarrior.cfg")
|
||||||
self.extdir = os.path.join(self.datadir, 'extensions')
|
self.extdir = os.path.join(self.datadir, "extensions")
|
||||||
|
|
||||||
# Ensure any instance is properly destroyed at session end
|
# Ensure any instance is properly destroyed at session end
|
||||||
atexit.register(lambda: self.destroy())
|
atexit.register(lambda: self.destroy())
|
||||||
|
|
|
@ -20,7 +20,7 @@ except ImportError:
|
||||||
import json
|
import json
|
||||||
from .exceptions import CommandError, TimeoutWaitingFor
|
from .exceptions import CommandError, TimeoutWaitingFor
|
||||||
|
|
||||||
ON_POSIX = 'posix' in sys.builtin_module_names
|
ON_POSIX = "posix" in sys.builtin_module_names
|
||||||
|
|
||||||
# Directory relative to basetest module location
|
# Directory relative to basetest module location
|
||||||
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
|
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
@ -126,7 +126,7 @@ def _queue_output(arguments, pidq, outputq):
|
||||||
out, err = proc.communicate(input)
|
out, err = proc.communicate(input)
|
||||||
|
|
||||||
if sys.version_info > (3,):
|
if sys.version_info > (3,):
|
||||||
out, err = out.decode('utf-8'), err.decode('utf-8')
|
out, err = out.decode("utf-8"), err.decode("utf-8")
|
||||||
|
|
||||||
# Give the output back to the caller
|
# Give the output back to the caller
|
||||||
outputq.put((out, err, proc.returncode))
|
outputq.put((out, err, proc.returncode))
|
||||||
|
@ -340,8 +340,8 @@ def parse_datafile(file):
|
||||||
line = line.rstrip("\n")
|
line = line.rstrip("\n")
|
||||||
|
|
||||||
# Turn [] strings into {} to be treated properly as JSON hashes
|
# Turn [] strings into {} to be treated properly as JSON hashes
|
||||||
if line.startswith('[') and line.endswith(']'):
|
if line.startswith("[") and line.endswith("]"):
|
||||||
line = '{' + line[1:-1] + '}'
|
line = "{" + line[1:-1] + "}"
|
||||||
|
|
||||||
if line.startswith("{"):
|
if line.startswith("{"):
|
||||||
data.append(json.loads(line))
|
data.append(json.loads(line))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue