rename languages as dependencies

This commit is contained in:
Alan Hamlett 2015-09-26 19:26:15 -07:00
parent 5ee4f41a87
commit ddb01ee894
11 changed files with 6 additions and 6 deletions

View file

@ -9,7 +9,7 @@ import time
import sys import sys
from wakatime.compat import u from wakatime.compat import u
from wakatime.exceptions import NotYetImplemented from wakatime.exceptions import NotYetImplemented
from wakatime.languages import TokenParser from wakatime.dependencies import TokenParser
from wakatime.packages.requests.models import Response from wakatime.packages.requests.models import Response
from . import utils from . import utils
@ -23,7 +23,7 @@ except ImportError:
from unittest.mock import ANY from unittest.mock import ANY
class LanguagesTestCase(utils.TestCase): class DependenciesTestCase(utils.TestCase):
patch_these = [ patch_these = [
'wakatime.packages.requests.adapters.HTTPAdapter.send', 'wakatime.packages.requests.adapters.HTTPAdapter.send',
'wakatime.offlinequeue.Queue.push', 'wakatime.offlinequeue.Queue.push',
@ -39,7 +39,7 @@ class LanguagesTestCase(utils.TestCase):
parser = TokenParser(source_file) parser = TokenParser(source_file)
parser.parse() parser.parse()
with utils.mock.patch('wakatime.languages.TokenParser._extract_tokens') as mock_extract_tokens: with utils.mock.patch('wakatime.dependencies.TokenParser._extract_tokens') as mock_extract_tokens:
source_file = 'tests/samples/codefiles/see.h' source_file = 'tests/samples/codefiles/see.h'
parser = TokenParser(source_file) parser = TokenParser(source_file)
parser.tokens parser.tokens

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
wakatime.languages wakatime.dependencies
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
Parse dependencies from a source code file. Parse dependencies from a source code file.

View file

@ -14,7 +14,7 @@ import os
import sys import sys
from .compat import u, open from .compat import u, open
from .languages import DependencyParser from .dependencies import DependencyParser
if sys.version_info[0] == 2: if sys.version_info[0] == 2:
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'packages', 'pygments_py2')) sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'packages', 'pygments_py2'))