Skip to content

Commit

Permalink
Removed unnecessary function
Browse files Browse the repository at this point in the history
  • Loading branch information
Brachi committed Oct 2, 2016
1 parent cfc4ee7 commit d21e277
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 26 deletions.
9 changes: 9 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[run]
branch = True
source = .
# necessary for travis-ci since blender is downloaded in the build dir
omit = */python/lib/*

[paths]
source = .
*/.config/blender/*/scripts/addons
*/scripts/addons/
# TODO: test Windows paths
# XXX this will give much less coverage if other addons are installed

26 changes: 0 additions & 26 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from collections import namedtuple
import configparser
import os
from pathlib import Path
import re
Expand Down Expand Up @@ -47,7 +46,6 @@ def setup_blender(tmpdir_factory):
os.environ['COVERAGE_PROCESS_START'] = blender_coveragerc

yield blender
_set_paths_in_coveragerc(albam_addon_source_path)
# TODO: see pytest_sessionfinish


Expand Down Expand Up @@ -144,30 +142,6 @@ def _create_coveragerc_for_blender(base_temp, albam_source_path):
return str(dst)


def _set_paths_in_coveragerc(albam_addon_source_path):
"""adds [paths] to the current .coveragerc adding the source installed as addond,
for combining both coverage files"""

# XXX this is temporary until it's decided how albam is shipped
# if multiple addons are installed, coverage will take all addons as missing
# files
albam_addon_source_path = os.path.dirname(albam_addon_source_path)
with open(str(COVERAGERC_FILE)) as f:
original_coveragerc = f.read()

config = configparser.ConfigParser()
config.read([str(COVERAGERC_FILE)])
try:
config.add_section('paths')
except configparser.DuplicateSectionError:
pass
config.set('paths', 'source', '.\n{}'.format(albam_addon_source_path))

with open(str(COVERAGERC_FILE), 'w') as w:
config.write(w)
return original_coveragerc


PYTHON_TEMPLATE = """import os
import logging
import sys
Expand Down

0 comments on commit d21e277

Please sign in to comment.