Created
August 8, 2016 20:44
-
-
Save Makman2/6e232f8d0216fb1de1fd0c0649170e8b to your computer and use it in GitHub Desktop.
Latest test run for coala on 8 August 2016 ~22:40 with recent master
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
D:\Users\MAK\Eigene Dokumente\GitHub\coala [Makman2/linter-update ≡ +3 ~0 -0 !]> py.test --cov --cov-report html | |
============================= test session starts ============================= | |
platform win32 -- Python 3.4.3, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 | |
rootdir: D:\Users\MAK\Eigene Dokumente\GitHub\coala, inifile: setup.cfg | |
plugins: cov-2.2.1, env-0.6.0, mock-1.1, timeout-1.0.0, xdist-1.14 | |
collected 549 items / 14 skipped | |
coalib\bearlib\naming_conventions\__init__.py .... | |
coalib\bears\Bear.py .. | |
coalib\bears\requirements\CondaRequirement.py . | |
coalib\bears\requirements\DistributionRequirement.py . | |
coalib\bears\requirements\GemRequirement.py .. | |
coalib\bears\requirements\GoRequirement.py .. | |
coalib\bears\requirements\JuliaRequirement.py . | |
coalib\bears\requirements\NpmRequirement.py .. | |
coalib\bears\requirements\PackageRequirement.py .... | |
coalib\bears\requirements\PipRequirement.py . | |
coalib\bears\requirements\RscriptRequirement.py .. | |
coalib\collecting\Importers.py . | |
coalib\misc\Annotations.py . | |
coalib\misc\Caching.py . | |
coalib\misc\CachingUtilities.py . | |
coalib\misc\Shell.py . | |
coalib\output\ConsoleInteraction.py . | |
coalib\parsing\Globbing.py . | |
coalib\results\AbsolutePosition.py . | |
coalib\results\Diff.py ... | |
coalib\settings\ConfigurationGathering.py F | |
coalib\settings\FunctionMetadata.py .. | |
docs\index.rst s | |
docs\General_Dev_Info\git_tutorial_1.rst s | |
docs\Getting_Involved\Codestyle.rst s | |
docs\Getting_Involved\MAC_Hints.rst s | |
docs\Getting_Involved\Newcomers.rst s | |
docs\Getting_Involved\README.rst s | |
docs\Getting_Involved\Review.rst s | |
docs\Getting_Involved\Testing.rst s | |
docs\Getting_Involved\Writing_Documentation.rst s | |
docs\Getting_Involved\Writing_Good_Commits.rst s | |
docs\Getting_Involved\Writing_Tests.rst s | |
docs\Users\Container.rst s | |
docs\Users\Exit_Codes.rst s | |
docs\Users\External_APIs.rst s | |
docs\Users\FAQ.rst s | |
docs\Users\Git_Hooks.rst s | |
docs\Users\Glob_Patterns.rst . | |
docs\Users\Install.rst s | |
docs\Users\coafile.rst s | |
docs\Users\Tutorials\Development_Setup.rst s | |
docs\Users\Tutorials\Git_Help.rst s | |
docs\Users\Tutorials\Linter_Bears.rst s | |
docs\Users\Tutorials\Linter_Bears_Advanced.rst s | |
docs\Users\Tutorials\Shell_Autocompletion.rst s | |
docs\Users\Tutorials\Testing_Bears.rst s | |
docs\Users\Tutorials\Tutorial.rst s | |
docs\Users\Tutorials\Writing_Bears.rst s | |
tests\coalaCITest.py .F.F. | |
tests\coalaDeleteOrigTest.py .FF | |
tests\coalaFormatTest.py . | |
tests\coalaJSONTest.py .......... | |
tests\coalaTest.py F...... | |
tests\bearlib\abstractions\LintTest.py ............ | |
tests\bearlib\abstractions\LinterTest.py ............s........... | |
tests\bearlib\abstractions\SectionCreatableTest.py ... | |
tests\bearlib\abstractions\external_bear_wrap_testfiles\ExternalBearWrapTest.py ......... | |
tests\bearlib\languages\LanguageDefinitionTest.py .... | |
tests\bearlib\languages\documentation\DocstyleDefinitionTest.py .... | |
tests\bearlib\languages\documentation\DocumentationCommentTest.py ......... | |
tests\bearlib\languages\documentation\DocumentationExtractionTest.py ........ | |
tests\bearlib\spacing\SpacingHelperTest.py ..... | |
tests\bears\BearTest.py ......... | |
tests\bears\GlobalBearTest.py .. | |
tests\bears\LocalBearTest.py .. | |
tests\bears\requirements\DistributionRequirementTest.py .. | |
tests\bears\requirements\GemRequirementTest.py ss | |
tests\bears\requirements\GoRequirementTest.py ss | |
tests\bears\requirements\NpmRequirementTest.py ss | |
tests\bears\requirements\PipRequirementTest.py .... | |
tests\bears\requirements\RscriptRequirementTest.py ss | |
tests\collecting\CollectorsTest.py ...................... | |
tests\collecting\DependenciesTest.py ... | |
tests\collecting\ImportersTest.py ........ | |
tests\misc\AnnotationsTest.py ...... | |
tests\misc\BuildManPageTest.py ......... | |
tests\misc\CachingTest.py F..... | |
tests\misc\CachingUtilitiesTest.py ...... | |
tests\misc\ContextManagersTest.py ........ | |
tests\misc\DictUtilitiesTest.py .. | |
tests\misc\EnumTest.py .. | |
tests\misc\ExceptionsTest.py . | |
tests\misc\ShellTest.py ...... | |
tests\output\ConfWriterTest.py .. | |
tests\output\ConsoleInteractionTest.py ...F............................. | |
tests\output\InteractionsTest.py . | |
tests\output\JSONEncoderTest.py .......... | |
tests\output\dbus\BuildDbusServiceTest.py . | |
tests\output\printers\ListLogPrinterTest.py . | |
tests\output\printers\LogPrinterTest.py .... | |
tests\parsing\CliParsingTest.py .. | |
tests\parsing\ConfParserTest.py ....... | |
tests\parsing\DefaultArgParserTest.py .. | |
tests\parsing\GlobbingTest.py ................................ | |
tests\parsing\LineParserTest.py ...... | |
tests\processes\BearRunningTest.py ...... | |
tests\processes\LogPrinterThreadTest.py . | |
tests\processes\ProcessingTest.py ...................... | |
tests\processes\communication\LogMessageTest.py .... | |
tests\results\AbsolutePositionTest.py ...... | |
tests\results\DiffTest.py ..........s...... | |
tests\results\EnsureFilesPresentTest.py ...... | |
tests\results\HiddenResultTest.py . | |
tests\results\LineDiffTest.py .. | |
tests\results\RESULT_SEVERITYTest.py . | |
tests\results\ResultFilterTest.py .......... | |
tests\results\ResultTest.py ........ | |
tests\results\SourcePositionTest.py .F. | |
tests\results\SourceRangeTest.py ........... | |
tests\results\TextPositionTest.py .. | |
tests\results\TextRangeTest.py .......... | |
tests\results\result_actions\ApplyPatchActionTest.py ........ | |
tests\results\result_actions\OpenEditorActionTest.py .... | |
tests\results\result_actions\PrintDebugMessageActionTest.py .. | |
tests\results\result_actions\PrintMoreInfoActionTest.py .. | |
tests\results\result_actions\ResultActionTest.py . | |
tests\results\result_actions\ShowPatchActionTest.py ...... | |
tests\settings\ConfigurationGatheringTest.py ........... | |
tests\settings\DocstringMetadataTest.py .. | |
tests\settings\FunctionMetadataTest.py ..... | |
tests\settings\SectionFillingTest.py .. | |
tests\settings\SectionTest.py ............ | |
tests\settings\SettingTest.py .......... | |
--------------- coverage: platform win32, python 3.4.3-final-0 ---------------- | |
Coverage HTML written to dir htmlcov | |
=========================== short test summary info =========================== | |
SKIP [2] D:\Users\MAK\Eigene Dokumente\GitHub\coala\tests\output\dbus\DbusDocumentTest.py:10: unittest.case.SkipTest: python-dbus is not installed | |
SKIP [1] tests\bears\requirements\GoRequirementTest.py:11: Go is not installed. | |
SKIP [1] tests\bears\requirements\GemRequirementTest.py:18: Gem is not installed. | |
SKIP [2] D:\Users\MAK\Eigene Dokumente\GitHub\coala\tests\output\dbus\DbusServerTest.py:10: unittest.case.SkipTest: python-dbus is not installed | |
SKIP [1] d:\program files (x86)\python 3.4.3\lib\site-packages\_pytest\doctest.py:178: unable to import module local('D:\\Users\\MAK\\Eigene Dokumente\\GitHub\\coala\\coalib\\coala_dbus.py') | |
SKIP [1] tests\bears\requirements\NpmRequirementTest.py:11: Npm is not installed. | |
SKIP [1] d:\program files (x86)\python 3.4.3\lib\site-packages\_pytest\doctest.py:178: unable to import module local('D:\\Users\\MAK\\Eigene Dokumente\\GitHub\\coala\\coalib\\output\\dbus\\DbusApp.py') | |
SKIP [1] tests\bearlib\abstractions\LinterTest.py:592: `pwd` does not exist in Windows-cmd and `cd` is a built-in command which fails the executable-existence check from @linter. | |
SKIP [1] tests\bears\requirements\GemRequirementTest.py:15: Gem is not installed. | |
SKIP [1] d:\program files (x86)\python 3.4.3\lib\site-packages\_pytest\doctest.py:178: unable to import module local('D:\\Users\\MAK\\Eigene Dokumente\\GitHub\\coala\\coalib\\output\\dbus\\DbusDocument.py') | |
SKIP [2] D:\Users\MAK\Eigene Dokumente\GitHub\coala\tests\coalaDbusTest.py:8: unittest.case.SkipTest: python-gi or python-dbus not installed | |
SKIP [1] tests\results\DiffTest.py:180: [WinError 126] Das angegebene Modul wurde nicht gefunden. To provide a path to libclang use Config.set_library_path() or Config.set_library_file(). | |
SKIP [2] D:\Users\MAK\Eigene Dokumente\GitHub\coala\tests\output\dbus\DbusTest.py:15: unittest.case.SkipTest: python-dbus or python-gi is not installed | |
SKIP [26] d:\program files (x86)\python 3.4.3\lib\site-packages\_pytest\doctest.py:165: all tests skipped by +SKIP option | |
SKIP [2] D:\Users\MAK\Eigene Dokumente\GitHub\coala\tests\output\dbus\DbusAppTest.py:7: unittest.case.SkipTest: python-dbus is not installed | |
SKIP [1] tests\bears\requirements\RscriptRequirementTest.py:9: R is not installed. | |
SKIP [1] tests\bears\requirements\RscriptRequirementTest.py:12: R is not installed. | |
SKIP [1] d:\program files (x86)\python 3.4.3\lib\site-packages\_pytest\doctest.py:178: unable to import module local('D:\\Users\\MAK\\Eigene Dokumente\\GitHub\\coala\\coalib\\output\\dbus\\DbusServer.py') | |
SKIP [1] tests\bears\requirements\GoRequirementTest.py:8: Go is not installed. | |
SKIP [1] tests\bears\requirements\NpmRequirementTest.py:8: Npm is not installed. | |
================================== FAILURES =================================== | |
____ [doctest] coalib.settings.ConfigurationGathering.get_config_directory ____ | |
239 of the coafile will be assumed the configuration directory: | |
240 | |
241 >>> section.append(Setting("files", "**", origin="/tmp/.coafile")) | |
242 >>> get_config_directory(section) == os.path.abspath('/tmp/') | |
243 True | |
244 | |
245 However if its origin is already a directory this will be preserved: | |
246 | |
247 >>> section['files'].origin = os.path.abspath('/tmp/dir/') | |
248 >>> os.makedirs(section['files'].origin, exist_ok=True) | |
UNEXPECTED EXCEPTION: PermissionError(13, 'Zugriff verweigert') | |
Traceback (most recent call last): | |
File "d:\program files (x86)\python 3.4.3\lib\doctest.py", line 1318, in __run | |
compileflags, 1), test.globs) | |
File "<doctest coalib.settings.ConfigurationGathering.get_config_directory[5]>", line 1, in <module> | |
File "d:\program files (x86)\python 3.4.3\lib\os.py", line 227, in makedirs | |
makedirs(head, mode, exist_ok) | |
File "d:\program files (x86)\python 3.4.3\lib\os.py", line 237, in makedirs | |
mkdir(name, mode) | |
PermissionError: [WinError 5] Zugriff verweigert: 'D:\\tmp' | |
D:\Users\MAK\Eigene Dokumente\GitHub\coala\coalib\settings\ConfigurationGathering.py:248: UnexpectedException | |
________________________ coalaCITest.test_find_issues _________________________ | |
self = <tests.coalaCITest.coalaCITest testMethod=test_find_issues> | |
def test_find_issues(self): | |
with bear_test_module(), \ | |
prepare_file(["#fixme"], None) as (lines, filename): | |
retval, output = execute_coala(coala_ci.main, "coala-ci", | |
"-c", os.devnull, | |
"-b", "LineCountTestBear", | |
"-f", re.escape(filename)) | |
self.assertIn("This file has 1 lines.", | |
output, | |
> "The output should report count as 1 lines") | |
E AssertionError: 'This file has 1 lines.' not found in 'Executing section Default...\n\x1b[31m[ERROR][22:39:16] \x1b[0mAn unknown error occurred. This is a bug. We are sorry for the inconvenience. Please contact the developers for assistance. During execution of coala an exception was raised. This should never happen. When asked for, the following information may help investigating:\n' : The output should report count as 1 lines | |
tests\coalaCITest.py:49: AssertionError | |
____________________ coalaCITest.test_fix_patchable_issues ____________________ | |
self = <tests.coalaCITest.coalaCITest testMethod=test_fix_patchable_issues> | |
def test_fix_patchable_issues(self): | |
with bear_test_module(), \ | |
prepare_file(["\t#include <a>"], None) as (lines, filename): | |
retval, output = execute_coala( | |
coala_ci.main, "coala-ci", | |
"-c", os.devnull, | |
"-f", re.escape(filename), | |
"-b", "SpaceConsistencyTestBear", | |
"--settings", "autoapply=true", "use_spaces=True", | |
"default_actions=SpaceConsistencyTestBear:ApplyPatchAction") | |
> self.assertIn("Applied 'ApplyPatchAction'", output) | |
E AssertionError: "Applied 'ApplyPatchAction'" not found in "Executing section Default...\n\x1b[31m[ERROR][22:39:19] \x1b[0mFailed to execute action 'ApplyPatchAction' with error: path is on mount 'c:', start on mount 'D:'.\n\x1b[31m[ERROR][22:39:19] \x1b[0mAn unknown error occurred. This is a bug. We are sorry for the inconvenience. Please contact the developers for assistance. During execution of coala an exception was raised. This should never happen. When asked for, the following information may help investigating:\n" | |
tests\coalaCITest.py:63: AssertionError | |
___________________ coalaDeleteOrigTest.test_normal_running ___________________ | |
self = <tests.coalaDeleteOrigTest.coalaDeleteOrigTest testMethod=test_normal_running> | |
def test_normal_running(self): | |
with tempfile.TemporaryDirectory() as directory: | |
temporary = tempfile.mkstemp(suffix=".orig", dir=directory) | |
os.close(temporary[0]) | |
section = Section("") | |
section.append(Setting("project_dir", re.escape(directory))) | |
> retval = coala_delete_orig.main(section=section) | |
tests\coalaDeleteOrigTest.py:50: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
coalib\coala_delete_orig.py:27: in main | |
+ os.path.relpath(ofile)) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
path = 'c:\\users\\mak\\appdata\\local\\temp\\tmp4l1b_r6l\\tmp8_o9hj8a.orig' | |
start = '.' | |
def relpath(path, start=curdir): | |
"""Return a relative version of a path""" | |
sep = _get_sep(path) | |
if start is curdir: | |
start = _get_dot(path) | |
if not path: | |
raise ValueError("no path specified") | |
start_abs = abspath(normpath(start)) | |
path_abs = abspath(normpath(path)) | |
start_drive, start_rest = splitdrive(start_abs) | |
path_drive, path_rest = splitdrive(path_abs) | |
if normcase(start_drive) != normcase(path_drive): | |
error = "path is on mount '{0}', start on mount '{1}'".format( | |
path_drive, start_drive) | |
> raise ValueError(error) | |
E ValueError: path is on mount 'c:', start on mount 'D:' | |
d:\program files (x86)\python 3.4.3\lib\ntpath.py:579: ValueError | |
__________________ coalaDeleteOrigTest.test_remove_exception __________________ | |
self = <tests.coalaDeleteOrigTest.coalaDeleteOrigTest testMethod=test_remove_exception> | |
mock_glob = <MagicMock name='glob' id='95612048'> | |
@unittest.mock.patch('coalib.parsing.Globbing.glob') | |
def test_remove_exception(self, mock_glob): | |
# Non existent file | |
mock_glob.return_value = ["non_existent_file"] | |
with retrieve_stdout() as stdout: | |
retval = coala_delete_orig.main(section=self.section) | |
output = stdout.getvalue() | |
self.assertEqual(retval, 0) | |
self.assertIn("Couldn't delete", output) | |
# Directory instead of file | |
with tempfile.TemporaryDirectory() as filename, \ | |
retrieve_stdout() as stdout: | |
mock_glob.return_value = [filename] | |
> retval = coala_delete_orig.main(section=self.section) | |
tests\coalaDeleteOrigTest.py:39: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
coalib\coala_delete_orig.py:27: in main | |
+ os.path.relpath(ofile)) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
path = 'C:\\Users\\MAK\\AppData\\Local\\Temp\\tmpqvocbdsh', start = '.' | |
def relpath(path, start=curdir): | |
"""Return a relative version of a path""" | |
sep = _get_sep(path) | |
if start is curdir: | |
start = _get_dot(path) | |
if not path: | |
raise ValueError("no path specified") | |
start_abs = abspath(normpath(start)) | |
path_abs = abspath(normpath(path)) | |
start_drive, start_rest = splitdrive(start_abs) | |
path_drive, path_rest = splitdrive(path_abs) | |
if normcase(start_drive) != normcase(path_drive): | |
error = "path is on mount '{0}', start on mount '{1}'".format( | |
path_drive, start_drive) | |
> raise ValueError(error) | |
E ValueError: path is on mount 'C:', start on mount 'D:' | |
d:\program files (x86)\python 3.4.3\lib\ntpath.py:579: ValueError | |
____________________________ coalaTest.test_coala _____________________________ | |
self = <tests.coalaTest.coalaTest testMethod=test_coala> | |
def test_coala(self): | |
with bear_test_module(), \ | |
prepare_file(["#fixme"], None) as (lines, filename): | |
retval, output = execute_coala( | |
coala.main, | |
"coala", "-c", os.devnull, | |
"-f", re.escape(filename), | |
"-b", "LineCountTestBear") | |
self.assertIn("This file has 1 lines.", | |
output, | |
> "The output should report count as 1 lines") | |
E AssertionError: 'This file has 1 lines.' not found in 'Executing section Default...\n\x1b[31m[ERROR][22:39:28] \x1b[0mAn unknown error occurred. This is a bug. We are sorry for the inconvenience. Please contact the developers for assistance. During execution of coala an exception was raised. This should never happen. When asked for, the following information may help investigating:\n' : The output should report count as 1 lines | |
tests\coalaTest.py:31: AssertionError | |
______________________ CachingTest.test_caching_results _______________________ | |
self = <tests.misc.CachingTest.CachingTest testMethod=test_caching_results> | |
def test_caching_results(self): | |
""" | |
A simple integration test to assert that results are not dropped | |
when coala is ran multiple times with caching enabled. | |
""" | |
with bear_test_module(), \ | |
prepare_file(["a=(5,6)"], None) as (lines, filename): | |
with simulate_console_inputs("0"): | |
retval, output = execute_coala( | |
coala.main, | |
"coala", | |
"-c", os.devnull, | |
"--disable-caching", | |
"--flush-cache", | |
"-f", re.escape(filename), | |
"-b", "LineCountTestBear", | |
"-L", "DEBUG") | |
> self.assertIn("This file has", output) | |
E AssertionError: 'This file has' not found in '\x1b[32m[DEBUG][22:39:33] \x1b[0mPlatform Windows -- Python 3.4.3, pip 8.0.2, coalib 0.8.0.dev99999999999999\nExecuting section Default...\n\x1b[32m[DEBUG][22:39:34] \x1b[0mFiles that will be checked:\nc:\\users\\mak\\appdata\\local\\temp\\tmpajv6v27x\n\x1b[32m[DEBUG][22:39:34] \x1b[0mRunning bear LineCountTestBear...\n\x1b[31m[ERROR][22:39:35] \x1b[0mAn unknown error occurred. This is a bug. We are sorry for the inconvenience. Please contact the developers for assistance. During execution of coala an exception was raised. This should never happen. When asked for, the following information may help investigating:\n\x1b[32m[DEBUG][22:39:35] \x1b[0mException was:\nTraceback (most recent call last):\n\n File "D:\\Users\\MAK\\Eigene Dokumente\\GitHub\\coala\\coalib\\coala_main.py", line 101, in run_coala\n log_printer=log_printer)\n\n File "D:\\Users\\MAK\\Eigene Dokumente\\GitHub\\coala\\coalib\\processes\\Processing.py", line 700, in execute_section\n log_printer),\n\n File "D:\\Users\\MAK\\Eigene Dokumente\\GitHub\\coala\\coalib\\processes\\Processing.py", line 550, in process_queues\n ignore_ranges)\n\n File "D:\\Users\\MAK\\Eigene Dokumente\\GitHub\\coala\\coalib\\processes\\Processing.py", line 237, in print_result\n file_diff_dict)\n\n File "D:\\Users\\MAK\\Eigene Dokumente\\GitHub\\coala\\coalib\\output\\ConsoleInteraction.py", line 404, in print_results\n color=color)\n\n File "D:\\Users\\MAK\\Eigene Dokumente\\GitHub\\coala\\coalib\\output\\ConsoleInteraction.py", line 335, in print_affected_files\n sourcerange)\n\n File "D:\\Users\\MAK\\Eigene Dokumente\\GitHub\\coala\\coalib\\output\\ConsoleInteraction.py", line 415, in print_affected_lines\n console_printer.print("\\n" + os.path.relpath(sourcerange.file),\n\n File "d:\\program files (x86)\\python 3.4.3\\lib\\ntpath.py", line 579, in relpath\n raise ValueError(error)\n\nValueError: path is on mount \'c:\', start on mount \'D:\'\n' | |
tests\misc\CachingTest.py:113: AssertionError | |
______________ ConsoleInteractionTest.test_print_affected_files _______________ | |
self = <tests.output.ConsoleInteractionTest.ConsoleInteractionTest testMethod=test_print_affected_files> | |
def test_print_affected_files(self): | |
with retrieve_stdout() as stdout, \ | |
make_temp() as some_file: | |
file_dict = {some_file: ["1\n", "2\n", "3\n"]} | |
affected_code = (SourceRange.from_values(some_file),) | |
print_affected_files(self.console_printer, | |
self.log_printer, | |
Section(""), | |
Result("origin", | |
"message", | |
affected_code=affected_code), | |
file_dict, | |
> color=True) | |
tests\output\ConsoleInteractionTest.py:346: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
coalib\output\ConsoleInteraction.py:335: in print_affected_files | |
sourcerange) | |
coalib\output\ConsoleInteraction.py:415: in print_affected_lines | |
console_printer.print("\n" + os.path.relpath(sourcerange.file), | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
path = 'C:\\Users\\MAK\\AppData\\Local\\Temp\\tmp1dmok_cv', start = '.' | |
def relpath(path, start=curdir): | |
"""Return a relative version of a path""" | |
sep = _get_sep(path) | |
if start is curdir: | |
start = _get_dot(path) | |
if not path: | |
raise ValueError("no path specified") | |
start_abs = abspath(normpath(start)) | |
path_abs = abspath(normpath(path)) | |
start_drive, start_rest = splitdrive(start_abs) | |
path_drive, path_rest = splitdrive(path_abs) | |
if normcase(start_drive) != normcase(path_drive): | |
error = "path is on mount '{0}', start on mount '{1}'".format( | |
path_drive, start_drive) | |
> raise ValueError(error) | |
E ValueError: path is on mount 'C:', start on mount 'D:' | |
d:\program files (x86)\python 3.4.3\lib\ntpath.py:579: ValueError | |
________________________ SourcePositionTest.test_json _________________________ | |
self = <tests.results.SourcePositionTest.SourcePositionTest testMethod=test_json> | |
def test_json(self): | |
with prepare_file([""], None) as (_, filename): | |
uut = SourcePosition(filename, 1) | |
> self.assertEqual(uut.__json__(use_relpath=True) | |
['file'], relpath(filename)) | |
tests\results\SourcePositionTest.py:38: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
coalib\results\SourcePosition.py:37: in __json__ | |
_dict['file'] = relpath(_dict['file']) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
path = 'C:\\Users\\MAK\\AppData\\Local\\Temp\\tmp0re1gipo', start = '.' | |
def relpath(path, start=curdir): | |
"""Return a relative version of a path""" | |
sep = _get_sep(path) | |
if start is curdir: | |
start = _get_dot(path) | |
if not path: | |
raise ValueError("no path specified") | |
start_abs = abspath(normpath(start)) | |
path_abs = abspath(normpath(path)) | |
start_drive, start_rest = splitdrive(start_abs) | |
path_drive, path_rest = splitdrive(path_abs) | |
if normcase(start_drive) != normcase(path_drive): | |
error = "path is on mount '{0}', start on mount '{1}'".format( | |
path_drive, start_drive) | |
> raise ValueError(error) | |
E ValueError: path is on mount 'C:', start on mount 'D:' | |
d:\program files (x86)\python 3.4.3\lib\ntpath.py:579: ValueError | |
= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment