Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-chartify for openSUSE:Factory 
checked in at 2021-02-15 23:18:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-chartify (Old)
 and      /work/SRC/openSUSE:Factory/.python-chartify.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-chartify"

Mon Feb 15 23:18:38 2021 rev:4 rq:872000 version:3.0.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-chartify/python-chartify.changes  
2020-07-08 19:19:49.384358923 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-chartify.new.28504/python-chartify.changes   
    2021-02-15 23:20:54.911809368 +0100
@@ -1,0 +2,11 @@
+Fri Feb 12 15:46:27 UTC 2021 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 3.0.3
+  * Fix loading of color, color palette and styles configuration 
+    with PyYaml >= 5.2
+- Change in 3.0.2
+  * Support pyyaml 5.2+ 
+- Skip python36 build in TW because python36-scipy is no more 
+  (NEP 29)
+
+-------------------------------------------------------------------

Old:
----
  chartify-3.0.1.tar.gz

New:
----
  chartify-3.0.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-chartify.spec ++++++
--- /var/tmp/diff_new_pack.8dhhxA/_old  2021-02-15 23:20:55.631810444 +0100
+++ /var/tmp/diff_new_pack.8dhhxA/_new  2021-02-15 23:20:55.635810449 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-chartify
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,8 +18,10 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define         skip_python2 1
+# NEP29: TW does not have python36-scipy anymore
+%define         skip_python36 1
 Name:           python-chartify
-Version:        3.0.1
+Version:        3.0.3
 Release:        0
 Summary:        Python library for plotting charts
 License:        Apache-2.0

++++++ chartify-3.0.1.tar.gz -> chartify-3.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/.github/workflows/tox.yml 
new/chartify-3.0.3/.github/workflows/tox.yml
--- old/chartify-3.0.1/.github/workflows/tox.yml        1970-01-01 
01:00:00.000000000 +0100
+++ new/chartify-3.0.3/.github/workflows/tox.yml        2020-11-02 
23:11:04.000000000 +0100
@@ -0,0 +1,24 @@
+name: Tox
+
+on: [push]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      max-parallel: 5
+      matrix:
+        python-version: [3.6, 3.7, 3.8]
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v2
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Install python dependencies
+      run: |
+        python -m pip install --upgrade pip
+        pip install tox tox-gh-actions
+    - name: Test with tox
+      run: tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/.travis.yml 
new/chartify-3.0.3/.travis.yml
--- old/chartify-3.0.1/.travis.yml      2020-06-02 23:49:25.000000000 +0200
+++ new/chartify-3.0.3/.travis.yml      1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-# Config file for automatic testing at travis-ci.org
-# This file will be regenerated if you run travis_pypi_setup.py
-
-language: python
-python:
-  - 3.6
-  - 3.7
-  - 3.8
-
-# command to install dependencies, e.g. pip install -r requirements.txt 
--use-mirrors
-install: pip install -U tox-travis
-
-# command to run tests, e.g. python setup.py test
-script: tox
-
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/CONTRIBUTING.rst 
new/chartify-3.0.3/CONTRIBUTING.rst
--- old/chartify-3.0.1/CONTRIBUTING.rst 2020-06-02 23:49:25.000000000 +0200
+++ new/chartify-3.0.3/CONTRIBUTING.rst 2020-11-02 23:11:04.000000000 +0100
@@ -107,7 +107,7 @@
    your new functionality into a function with a docstring, and add the
    feature to the list in README.rst.
 3. The pull request should work for Python 3.6. Check
-   https://travis-ci.org/spotify/chartify/pull_requests
+   https://github.com/spotify/chartify/actions
    and make sure that the tests pass for all supported Python versions.
 
 Tips
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/HISTORY.rst 
new/chartify-3.0.3/HISTORY.rst
--- old/chartify-3.0.1/HISTORY.rst      2020-06-02 23:49:25.000000000 +0200
+++ new/chartify-3.0.3/HISTORY.rst      2020-11-02 23:11:04.000000000 +0100
@@ -2,6 +2,11 @@
 History
 =======
 
+3.0.2 (2020-10-21)
+------------------
+
+* Support pyyaml 5.2+
+
 3.0.1 (2020-06-02)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/README.rst 
new/chartify-3.0.3/README.rst
--- old/chartify-3.0.1/README.rst       2020-06-02 23:49:25.000000000 +0200
+++ new/chartify-3.0.3/README.rst       2020-11-02 23:11:04.000000000 +0100
@@ -1,11 +1,13 @@
 Chartify
 ========
 
-|status|  |release|  |python|
+|status|  |release|  |python|  |CI|
 
 .. |status| image:: https://img.shields.io/badge/Status-Beta-blue.svg
 .. |release| image:: https://img.shields.io/badge/Release-3.0.0-blue.svg
 .. |python| image:: https://img.shields.io/badge/Python-3.6-blue.svg
+.. |CI| image:: https://github.com/spotify/chartify/workflows/Tox/badge.svg
+        :target: https://github.com/spotify/chartify/actions
 
 Chartify is a Python library that makes it easy for data scientists to create 
charts.
 
@@ -14,7 +16,7 @@
 
 - Consistent input data format: Spend less time transforming data to get your 
charts to work. All plotting functions use a consistent tidy input data format.
 - Smart default styles: Create pretty charts with very little customization 
required.
-- Simple API: We've attempted to make to the API as intuitive and easy to 
learn as possible.
+- Simple API: We've attempted to make the API as intuitive and easy to learn 
as possible.
 - Flexibility: Chartify is built on top of `Bokeh 
<http://bokeh.pydata.org/en/latest/>`_, so if you do need more control you can 
always fall back on Bokeh's API.
 
 Examples
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/chartify/__init__.py 
new/chartify-3.0.3/chartify/__init__.py
--- old/chartify-3.0.1/chartify/__init__.py     2020-06-02 23:49:25.000000000 
+0200
+++ new/chartify-3.0.3/chartify/__init__.py     2020-11-02 23:11:04.000000000 
+0100
@@ -22,7 +22,7 @@
 
 __author__ = """Chris Halpert"""
 __email__ = 'chalp...@spotify.com'
-__version__ = '3.0.1'
+__version__ = '3.0.3'
 
 _IPYTHON_INSTANCE = False
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/chartify/_core/chart.py 
new/chartify-3.0.3/chartify/_core/chart.py
--- old/chartify-3.0.1/chartify/_core/chart.py  2020-06-02 23:49:25.000000000 
+0200
+++ new/chartify-3.0.3/chartify/_core/chart.py  2020-11-02 23:11:04.000000000 
+0100
@@ -25,7 +25,7 @@
 import warnings
 
 import bokeh
-from bokeh.io.export import _SVG_SCRIPT
+from bokeh.io.export import _SVG_SCRIPT, wait_until_render_complete
 import bokeh.plotting
 from bokeh.embed import file_html
 
@@ -428,7 +428,7 @@
             pass
         else:
             raise ValueError(
-                """Invalid format. Valid options are 'html' or 'png'.""")
+                """Invalid format. Valid options are 'html', 'png' or 
'svg'.""")
 
     def _initialize_webdriver(self):
         """Initialize headless chrome browser"""
@@ -500,6 +500,7 @@
         fp.write(html)
         fp.flush()
         driver.get("file:///" + fp.name)
+        wait_until_render_complete(driver, 5)
         svgs = driver.execute_script(_SVG_SCRIPT)
         fp.close()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/chartify/_core/colors.py 
new/chartify-3.0.3/chartify/_core/colors.py
--- old/chartify-3.0.1/chartify/_core/colors.py 2020-06-02 23:49:25.000000000 
+0200
+++ new/chartify-3.0.3/chartify/_core/colors.py 2020-11-02 23:11:04.000000000 
+0100
@@ -42,7 +42,9 @@
 
     def from_yaml(self, filename):
         """Load colors from yaml file"""
-        return yaml.load(open(filename), Loader=yaml.FullLoader)
+        # Note: We assume that the contents of the config file are trusted
+        # TODO: Change this file format to be plain yaml and use SafeLoader
+        return yaml.load(open(filename), Loader=yaml.UnsafeLoader)
 
     def overwrite_colors(self):
         """Overwrite colors in the colour module with custom colors."""
@@ -273,7 +275,7 @@
 
     def _from_yaml(self, filename):
         """Load color palettes from a yaml file"""
-        palette_list = yaml.load(open(filename), Loader=yaml.FullLoader)
+        palette_list = yaml.load(open(filename), Loader=yaml.SafeLoader)
         for palette in palette_list:
             hex_color_list, palette_type, name = palette
             self._add_palette(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/chartify/_core/options.py 
new/chartify-3.0.3/chartify/_core/options.py
--- old/chartify-3.0.1/chartify/_core/options.py        2020-06-02 
23:49:25.000000000 +0200
+++ new/chartify-3.0.3/chartify/_core/options.py        2020-11-02 
23:11:04.000000000 +0100
@@ -107,7 +107,9 @@
 
         Overwrites any options that are specified in the yaml file.
         """
-        yaml_options = yaml.load(open(filename), Loader=yaml.FullLoader)
+        # Note: We assume that the contents of the config file are trusted
+        # TODO: Change this file format to be plain yaml and use SafeLoader
+        yaml_options = yaml.load(open(filename), Loader=yaml.UnsafeLoader)
         self._options.update(yaml_options)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/requirements.txt 
new/chartify-3.0.3/requirements.txt
--- old/chartify-3.0.1/requirements.txt 2020-06-02 23:49:25.000000000 +0200
+++ new/chartify-3.0.3/requirements.txt 2020-11-02 23:11:04.000000000 +0100
@@ -6,4 +6,5 @@
 bokeh>=2.0.0,<3.0.0
 scipy>=1.0.0,<2.0.0
 ipykernel>=5.0
-ipython>=7.0
\ No newline at end of file
+ipython>=7.0
+pyyaml>=5.3.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/tests/test_chart.py 
new/chartify-3.0.3/tests/test_chart.py
--- old/chartify-3.0.1/tests/test_chart.py      2020-06-02 23:49:25.000000000 
+0200
+++ new/chartify-3.0.3/tests/test_chart.py      2020-11-02 23:11:04.000000000 
+0100
@@ -120,14 +120,13 @@
                         self.chart.data))[0]['unit_price'],
             data[data['fruit'] == color_order[0]]['unit_price'].values))
 
-    def test_save(self):
+    def test_save(self, tmpdir):
         ch = self.chart
-        output_path = './tests/outputs/chart/'
         base_filename = 'test_save'
         for filetype in ('png', 'svg', 'html'):
-            filename = output_path + base_filename + '.' + filetype
+            filename = tmpdir.join(base_filename + '.' + filetype)
             try:
-                ch.save(filename=filename, format=filetype)
+                ch.save(filename=str(filename), format=filetype)
             # Occurs if chromedriver is not found
             except WebDriverException:
                 pytest.skip("Skipping save tests")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/tests/test_color_palettes_config.py 
new/chartify-3.0.3/tests/test_color_palettes_config.py
--- old/chartify-3.0.1/tests/test_color_palettes_config.py      1970-01-01 
01:00:00.000000000 +0100
+++ new/chartify-3.0.3/tests/test_color_palettes_config.py      2020-11-02 
23:11:04.000000000 +0100
@@ -0,0 +1,55 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2017-2020 Spotify AB
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import importlib
+import os
+
+COLOR_PALETTES_CONFIG = '''\
+- - - '#5ff550'
+    - '#fae62d'
+    - '#f037a5'
+  - categorical
+  - Foo Bar
+- - - '#ffc864'
+    - '#ffcdd2'
+    - '#eb1e32'
+  - categorical
+  - Baz Quux
+'''
+
+EXPECTED_COLOR_PALETTES = {
+    'foo bar': ['#5ff550', '#fae62d', '#f037a5'],
+    'baz quux': ['#ffc864', '#ffcdd2', '#eb1e32'],
+}
+
+
+def test_color_palettes_config(monkeypatch, tmpdir):
+    f = tmpdir.join('color_palettes_config.yaml')
+    f.write(COLOR_PALETTES_CONFIG)
+
+    # XXX (dano): CHARTIFY_CONFIG_DIR must end with /
+    monkeypatch.setenv('CHARTIFY_CONFIG_DIR', os.path.join(str(tmpdir), ''))
+
+    # reload modules to reload configuration
+    import chartify._core.options
+    import chartify._core.colors
+    importlib.reload(chartify._core.options)
+    importlib.reload(chartify._core.colors)
+
+    # Check that the expected palettes are loaded
+    color_palettes = chartify._core.colors.color_palettes
+    for name, palette in EXPECTED_COLOR_PALETTES.items():
+        assert color_palettes[name].to_hex_list() == palette
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/tests/test_colors.py 
new/chartify-3.0.3/tests/test_colors.py
--- old/chartify-3.0.1/tests/test_colors.py     2020-06-02 23:49:25.000000000 
+0200
+++ new/chartify-3.0.3/tests/test_colors.py     2020-11-02 23:11:04.000000000 
+0100
@@ -14,6 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 import chartify
+import importlib
 import numpy as np
 
 
@@ -25,6 +26,9 @@
 
 class TestColorPalettes:
     def test_getitem(self):
+        # reload configuration
+        importlib.reload(chartify)
+
         palette = chartify.color_palettes['Category20']
         assert (isinstance(palette, chartify._core.colors.ColorPalette))
         assert (palette.name == 'Category20')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/tests/test_colors_config.py 
new/chartify-3.0.3/tests/test_colors_config.py
--- old/chartify-3.0.1/tests/test_colors_config.py      1970-01-01 
01:00:00.000000000 +0100
+++ new/chartify-3.0.3/tests/test_colors_config.py      2020-11-02 
23:11:04.000000000 +0100
@@ -0,0 +1,64 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2017-2020 Spotify AB
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import importlib
+import os
+
+COLORS_CONFIG = '''\
+? !!python/tuple
+- 0
+- 100
+- 80
+: Foo
+? !!python/tuple
+- 25
+- 20
+- 20
+: Bar
+? !!python/tuple
+- 25
+- 230
+- 140
+: Baz
+'''
+
+EXPECTED_COLORS = {
+    'style.color_palette_categorical': 'My Palette',
+    'style.color_palette_sequential': 'Midnight Orange Sequential',
+    'style.color_palette_diverging': 'Midnight Orange Diverging',
+    'style.color_palette_accent': 'My Palette',
+    'style.color_palette_accent_default_color': 'light grey',
+}
+
+
+def test_colors_config(monkeypatch, tmpdir):
+    f = tmpdir.join('colors_config.yaml')
+    f.write(COLORS_CONFIG)
+
+    # XXX (dano): CHARTIFY_CONFIG_DIR must end with /
+    monkeypatch.setenv('CHARTIFY_CONFIG_DIR', os.path.join(str(tmpdir), ''))
+
+    # reload modules to reload configuration
+    import chartify._core.options
+    import chartify._core.colors
+    import chartify._core.style
+    importlib.reload(chartify._core.options)
+    importlib.reload(chartify._core.colors)
+
+    import chartify._core.colour as colour
+    assert colour.COLOR_NAME_TO_RGB['foo'] == (0, 100, 80)
+    assert colour.COLOR_NAME_TO_RGB['bar'] == (25, 20, 20)
+    assert colour.COLOR_NAME_TO_RGB['baz'] == (25, 230, 140)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/tests/test_examples.py 
new/chartify-3.0.3/tests/test_examples.py
--- old/chartify-3.0.1/tests/test_examples.py   2020-06-02 23:49:25.000000000 
+0200
+++ new/chartify-3.0.3/tests/test_examples.py   2020-11-02 23:11:04.000000000 
+0100
@@ -16,9 +16,13 @@
 """Tests for `chartify` package."""
 
 import chartify
+import importlib
 
 
 def test_examples():
+    # reload configuration
+    importlib.reload(chartify)
+
     excluded_examples = ['chart_show']
     public_examples = [
         attr for attr in dir(chartify.examples) if
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/tests/test_options_config.py 
new/chartify-3.0.3/tests/test_options_config.py
--- old/chartify-3.0.1/tests/test_options_config.py     1970-01-01 
01:00:00.000000000 +0100
+++ new/chartify-3.0.3/tests/test_options_config.py     2020-11-02 
23:11:04.000000000 +0100
@@ -0,0 +1,61 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2017-2020 Spotify AB
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import importlib
+import os
+
+OPTIONS_CONFIG = '''\
+!!python/object/apply:collections.OrderedDict
+- - - style.color_palette_categorical
+    - !!python/object:chartify._core.options.OptionValue
+      value: My Palette
+  - - style.color_palette_sequential
+    - !!python/object:chartify._core.options.OptionValue
+      value: Midnight Orange Sequential
+  - - style.color_palette_diverging
+    - !!python/object:chartify._core.options.OptionValue
+      value: Midnight Orange Diverging
+  - - style.color_palette_accent
+    - !!python/object:chartify._core.options.OptionValue
+      value: My Palette
+  - - style.color_palette_accent_default_color
+    - !!python/object:chartify._core.options.OptionValue
+      value: light grey
+'''
+
+EXPECTED_CONFIG = {
+    'style.color_palette_categorical': 'My Palette',
+    'style.color_palette_sequential': 'Midnight Orange Sequential',
+    'style.color_palette_diverging': 'Midnight Orange Diverging',
+    'style.color_palette_accent': 'My Palette',
+    'style.color_palette_accent_default_color': 'light grey',
+}
+
+
+def test_options_config(monkeypatch, tmpdir):
+    f = tmpdir.join('options_config.yaml')
+    f.write(OPTIONS_CONFIG)
+
+    # XXX (dano): CHARTIFY_CONFIG_DIR must end with /
+    monkeypatch.setenv('CHARTIFY_CONFIG_DIR', os.path.join(str(tmpdir), ''))
+
+    # reload modules to reload configuration
+    import chartify._core.options
+    options = importlib.reload(chartify._core.options)
+
+    config = {key: options.options.get_option(key)
+              for key in EXPECTED_CONFIG}
+    assert config == EXPECTED_CONFIG
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/tests/test_style_settings_config.py 
new/chartify-3.0.3/tests/test_style_settings_config.py
--- old/chartify-3.0.1/tests/test_style_settings_config.py      1970-01-01 
01:00:00.000000000 +0100
+++ new/chartify-3.0.3/tests/test_style_settings_config.py      2020-11-02 
23:11:04.000000000 +0100
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2017-2020 Spotify AB
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import importlib
+import os
+
+STYLE_SETTINGS_CONFIG = '''\
+foo:
+  baz.bar: 0.25
+  quux: deadbeef
+bar:
+  baz: bar quux
+'''
+
+
+def test_style_settings_config(monkeypatch, tmpdir):
+    f = tmpdir.join('style_settings_config.yaml')
+    f.write(STYLE_SETTINGS_CONFIG)
+
+    # XXX (dano): CHARTIFY_CONFIG_DIR must end with /
+    monkeypatch.setenv('CHARTIFY_CONFIG_DIR', os.path.join(str(tmpdir), ''))
+
+    # reload modules to reload configuration
+    import chartify._core.options
+    import chartify._core.style
+    importlib.reload(chartify._core.options)
+    importlib.reload(chartify._core.style)
+
+    # Check that the expected style is loaded
+    style = chartify._core.style.Style(None, '')
+
+    import yaml
+    expected_settings = yaml.safe_load(STYLE_SETTINGS_CONFIG)
+
+    for key, expected_value in expected_settings.items():
+        actual_value = style.settings[key]
+        assert expected_value == actual_value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/chartify-3.0.1/tox.ini new/chartify-3.0.3/tox.ini
--- old/chartify-3.0.1/tox.ini  2020-06-02 23:49:25.000000000 +0200
+++ new/chartify-3.0.3/tox.ini  2020-11-02 23:11:04.000000000 +0100
@@ -3,7 +3,7 @@
 skipsdist = True
 usedevelop = True
 
-[travis]
+[gh-actions]
 python =
     3.8: py38
     3.7: py37

Reply via email to