diff --git a/tests/test_dependencies.py b/tests/test_dependencies.py index 8c54588..064e93f 100644 --- a/tests/test_dependencies.py +++ b/tests/test_dependencies.py @@ -8,6 +8,8 @@ import os import time import sys from wakatime.compat import u +from wakatime.exceptions import NotYetImplemented +from wakatime.languages import TokenParser from wakatime.packages.requests.models import Response from . import utils @@ -31,6 +33,16 @@ class LanguagesTestCase(utils.TestCase): ['wakatime.session_cache.SessionCache.get', requests.session], ] + def test_token_parser(self): + with utils.mock.patch('wakatime.languages.TokenParser._extract_tokens') as mock_extract_tokens: + + with self.assertRaises(NotYetImplemented): + source_file = 'tests/samples/codefiles/see.h' + parser = TokenParser(source_file) + parser.parse() + + mock_extract_tokens.assert_called_once_with() + def test_python_dependencies_detected(self): response = Response() response.status_code = 0 diff --git a/tests/test_languages.py b/tests/test_languages.py index e7a1cc9..211bd7c 100644 --- a/tests/test_languages.py +++ b/tests/test_languages.py @@ -6,8 +6,6 @@ from wakatime.packages import requests import time from wakatime.compat import u -from wakatime.exceptions import NotYetImplemented -from wakatime.languages import TokenParser from wakatime.packages.requests.models import Response from . import utils @@ -22,16 +20,6 @@ class LanguagesTestCase(utils.TestCase): ['wakatime.session_cache.SessionCache.get', requests.session], ] - def test_token_parser(self): - with utils.mock.patch('wakatime.languages.TokenParser._extract_tokens') as mock_extract_tokens: - - with self.assertRaises(NotYetImplemented): - source_file = 'tests/samples/codefiles/see.h' - parser = TokenParser(source_file) - parser.parse() - - mock_extract_tokens.assert_called_once_with() - def test_language_detected_for_header_file(self): response = Response() response.status_code = 500