remove redundant wakatime from test file names

This commit is contained in:
Alan Hamlett 2015-09-08 14:15:35 -07:00
parent 68436b5700
commit 0d1c95cf9c
6 changed files with 7 additions and 7 deletions

View file

@ -27,8 +27,8 @@ except (ImportError, SyntaxError): # pragma: nocover
class CustomEncoder(json.JSONEncoder): class CustomEncoder(json.JSONEncoder):
def default(self, obj): def default(self, obj):
if isinstance(obj, bytes): if isinstance(obj, bytes): # pragma: nocover
obj = bytes.decode(obj) obj = u(obj)
return json.dumps(obj) return json.dumps(obj)
try: try:
encoded = super(CustomEncoder, self).default(obj) encoded = super(CustomEncoder, self).default(obj)

View file

@ -39,12 +39,12 @@ from .session_cache import SessionCache
from .stats import get_file_stats from .stats import get_file_stats
try: try:
from .packages import simplejson as json # pragma: nocover from .packages import simplejson as json # pragma: nocover
except (ImportError, SyntaxError): except (ImportError, SyntaxError): # pragma: nocover
import json # pragma: nocover import json
try: try:
from .packages import tzlocal # pragma: nocover from .packages import tzlocal
except: # pragma: nocover except: # pragma: nocover
from .packages import tzlocal3 as tzlocal # pragma: nocover from .packages import tzlocal3 as tzlocal
log = logging.getLogger('WakaTime') log = logging.getLogger('WakaTime')
@ -56,7 +56,7 @@ class FileAction(argparse.Action):
try: try:
if os.path.isfile(values): if os.path.isfile(values):
values = os.path.realpath(values) values = os.path.realpath(values)
except: except: # pragma: nocover
pass pass
setattr(namespace, self.dest, values) setattr(namespace, self.dest, values)