Skip to content

Commit

Permalink
Replace the Makefile with a complete dobi.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
dnephin committed Sep 7, 2016
1 parent 9e6d6f2 commit 8cbe883
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 24 deletions.
20 changes: 0 additions & 20 deletions Makefile

This file was deleted.

29 changes: 28 additions & 1 deletion dobi.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,51 @@

meta:
project: pystaticconf
default: test


mount=source:
bind: .
path: /work

mount=pypiconf:
bind: ~/.pypirc
path: /root/.pypirc
file: true

image=builder:
image: staticconf-dev
context: dockerfiles/
dockerfile: Dockerfile


job=test:
use: builder
mounts: [source]
interactive: true
command: tox
env: ['TOXENV={env.TOXENV:}']

job=shell:
use: builder
mounts: [source]
mounts: [source, pypiconf]
interactive: true
command: bash

job=clean:
use: builder
mounts: [source]
command: "find -name *.pyc -o -name __pycache__ -exec rm -rf {} \\;"

job=docs:
use: builder
mounts: [source]
command: "tox -e docs"
artifact: docs/build

job=release:
use: builder
mounts: [source, pypiconf]
interactive: true
depends: [docs]
command: "python3 setup.py sdist upload upload_docs"
6 changes: 4 additions & 2 deletions dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ RUN export DEBIAN_FRONTEND=noninteractive; \
pypy \
curl

RUN curl -LS https://bootstrap.pypa.io/get-pip.py | python3 && \
pip install tox
RUN curl -Ls https://bootstrap.pypa.io/get-pip.py | python3
RUN pip install \
tox \
yapyautotest

WORKDIR /work
5 changes: 4 additions & 1 deletion tests/loader_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import platform
import tempfile
import textwrap

Expand Down Expand Up @@ -188,13 +189,15 @@ def test_python_configuration(self):
assert_equal(config_data['some_value'], 'test')
assert_equal(config_data['more_values.depth'], 'one')

@pytest.mark.skipif(platform.python_implementation() == 'PyPy',
reason="Unexpected results on pypy")
def test_python_configuration_reload(self):
config_data = loader.PythonConfiguration(self.module)
assert_equal(config_data['more_values.depth'], 'one')
self.remove_module()
self.create_module('two')
config_data = loader.PythonConfiguration(self.module)
assert_equal(config_data['more_values.depth'], 'two')
assert config_data['more_values.depth'] == 'two'


class TestINIConfiguration(LoaderTestCase):
Expand Down

0 comments on commit 8cbe883

Please sign in to comment.