diff options
author | Robert Collins <robertc@robertcollins.net> | 2015-05-04 13:16:57 +1200 |
---|---|---|
committer | Robert Collins <robertc@robertcollins.net> | 2015-05-04 13:36:24 +1200 |
commit | 6e08cd178eff08fd29885b82e8534ee3064b55ba (patch) | |
tree | 230b0c4237dc77bffc14d056af1c0a060e9b1f66 | |
parent | 10978cc9ae808202cf7c4b96adb1965056e4a0c6 (diff) | |
download | testscenarios-git-6e08cd178eff08fd29885b82e8534ee3064b55ba.tar.gz |
Migrate to git.
- new source layout
- use pbr for build goodness
- setup wheel building
-rw-r--r-- | .bzrignore | 5 | ||||
-rw-r--r-- | .gitignore | 14 | ||||
-rw-r--r-- | HACKING | 21 | ||||
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | requirements.txt | 2 | ||||
-rw-r--r-- | setup.cfg | 25 | ||||
-rwxr-xr-x | setup.py | 35 | ||||
-rw-r--r-- | testscenarios/__init__.py (renamed from lib/testscenarios/__init__.py) | 7 | ||||
-rw-r--r-- | testscenarios/scenarios.py (renamed from lib/testscenarios/scenarios.py) | 0 | ||||
-rw-r--r-- | testscenarios/testcase.py (renamed from lib/testscenarios/testcase.py) | 0 | ||||
-rw-r--r-- | testscenarios/tests/__init__.py (renamed from lib/testscenarios/tests/__init__.py) | 2 | ||||
-rw-r--r-- | testscenarios/tests/test_scenarios.py (renamed from lib/testscenarios/tests/test_scenarios.py) | 0 | ||||
-rw-r--r-- | testscenarios/tests/test_testcase.py (renamed from lib/testscenarios/tests/test_testcase.py) | 0 |
14 files changed, 71 insertions, 57 deletions
diff --git a/.bzrignore b/.bzrignore deleted file mode 100644 index 336aaca..0000000 --- a/.bzrignore +++ /dev/null @@ -1,5 +0,0 @@ -TAGS -tags -lib/testtools -MANIFEST -dist diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dbfc916 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +TAGS +tags +lib/testtools +MANIFEST +dist +*~ +.eggs +.*.swp +testscenarios.egg-info +*.pyc +__pycache__ +*.egg +ChangeLog +AUTHORS @@ -4,23 +4,18 @@ Contributing to testscenarios Code access +++++++++++ -Branch from the trunk (all patches should be for trunk unless there are -exceptional circumstances):: +The main branch is `master` in `https://github.com/testing-cabal/testscenarios` - bzr branch lp:testscenarios path-to-new-local-branch - -Publish your branches whereever you like, I encourage launchpad hosting though, -as it can notify me of new testscenarios branches:: - - bzr push lp:~YOURUSERNAME/testscearios/YOURBRANCHNAME +Publish your branches wherever you like, I encourage github hosting though, +as you can use a pull request there to get a web UI for code review. Copyright +++++++++ -Testscenarios is Copyright (C) 2009 Robert Collins. I'd like to be able to +Testscenarios is Copyright (C) 2009,2015 Robert Collins. I'd like to be able to offer it up for stdlib inclusion once it has proved itself, so am asking for copyright assignment to me - or for your contributions to be under either the -BSD or Apache-2.0 licences that Testscenarios are with (which permit inclusion +BSD and Apache-2.0 licences that Testscenarios are with (which permit inclusion in Python). Coding standards @@ -36,3 +31,9 @@ The ``testscenarios`` module should simply import classes and functions from more specific modules, rather than becoming large and bloated itself. For instance, TestWithScenarios lives in testscenarios.testcase, and is imported in the testscenarios __init__.py. + +Releases +++++++++ + +Commit, tag with a signed tag, make release to build and push to pypi. push to +github. @@ -1,4 +1,4 @@ -PYTHONPATH:=$(shell pwd)/lib:${PYTHONPATH} +PYTHONPATH:=$(shell pwd):${PYTHONPATH} PYTHON ?= python all: check @@ -10,10 +10,13 @@ check: clean: find . -name '*.pyc' -print0 | xargs -0 rm -f -TAGS: lib/testscenarios/*.py lib/testscenarios/tests/*.py - ctags -e -R lib/testscenarios/ +TAGS: testscenarios/*.py testscenarios/tests/*.py + ctags -e -R testscenarios/ -tags: lib/testscenarios/*.py lib/testscenarios/tests/*.py - ctags -R lib/testscenarios/ +tags: testscenarios/*.py testscenarios/tests/*.py + ctags -R testscenarios/ -.PHONY: all check clean +release: + python setup.py sdist bdist_wheel upload -s + +.PHONY: all check release @@ -25,7 +25,7 @@ different situations). Dependencies ============ -* Python 2.4+ +* Python 2.6+ * testtools <https://launchpad.net/testtools> diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e1e5a1b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pbr >= 0.11 +testtools @@ -0,0 +1,25 @@ +[metadata] +name = testscenarios +summary = Testscenarios, a pyunit extension for dependency injection +description-file = README +author = Testing-cabal +author-email = testing-cabal@lists.launchpad.net +home-page = https://launchpad.net/testscenarios +classifier = + Development Status :: 6 - Mature + Intended Audience :: Developers + License :: OSI Approved :: BSD License + License :: OSI Approved :: Apache Software License + Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 3 + Topic :: Software Development :: Quality Assurance + Topic :: Software Development :: Testing + +[test] +test_module = testscenarios.tests +buffer=1 +catch=1 + +[bdist_wheel] +universal = 1 @@ -1,34 +1,7 @@ #!/usr/bin/env python +import setuptools -from setuptools import setup -import os.path +setuptools.setup( + setup_requires=['pbr'], + pbr=True) -description = open(os.path.join(os.path.dirname(__file__), 'README'), 'rt').read() - -setup(name="testscenarios", - version="0.4", - description="Testscenarios, a pyunit extension for dependency injection", - long_description=description, - maintainer="Robert Collins", - maintainer_email="robertc@robertcollins.net", - url="https://launchpad.net/testscenarios", - packages=['testscenarios', 'testscenarios.tests'], - package_dir = {'':'lib'}, - classifiers = [ - 'Development Status :: 6 - Mature', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', - 'License :: OSI Approved :: Apache Software License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Topic :: Software Development :: Quality Assurance', - 'Topic :: Software Development :: Testing', - ], - install_requires = [ - 'testtools', - ], - tests_require = [ - 'testtools >= 1', - ], - ) diff --git a/lib/testscenarios/__init__.py b/testscenarios/__init__.py index ceacf37..43e24c6 100644 --- a/lib/testscenarios/__init__.py +++ b/testscenarios/__init__.py @@ -38,7 +38,10 @@ methods for details. # established at this point, and setup.py will use a version of next-$(revno). # If the releaselevel is 'final', then the tarball will be major.minor.micro. # Otherwise it is major.minor.micro~$(revno). -__version__ = (0, 4, 0, 'final', 0) +from pbr.version import VersionInfo +_version = VersionInfo('testscenarios') +__version__ = _version.semantic_version().version_tuple() +version = _version.release_string() __all__ = [ 'TestWithScenarios', @@ -52,8 +55,6 @@ __all__ = [ ] -import unittest - from testscenarios.scenarios import ( apply_scenario, generate_scenarios, diff --git a/lib/testscenarios/scenarios.py b/testscenarios/scenarios.py index eeb72eb..eeb72eb 100644 --- a/lib/testscenarios/scenarios.py +++ b/testscenarios/scenarios.py diff --git a/lib/testscenarios/testcase.py b/testscenarios/testcase.py index 2ab50c7..2ab50c7 100644 --- a/lib/testscenarios/testcase.py +++ b/testscenarios/testcase.py diff --git a/lib/testscenarios/tests/__init__.py b/testscenarios/tests/__init__.py index 8e243b6..ecec6b1 100644 --- a/lib/testscenarios/tests/__init__.py +++ b/testscenarios/tests/__init__.py @@ -39,5 +39,5 @@ def load_tests(standard_tests, module, loader): standard_tests.addTests(loader.loadTestsFromNames(test_mod_names)) doctest.set_unittest_reportflags(doctest.REPORT_ONLY_FIRST_FAILURE) standard_tests.addTest( - doctest.DocFileSuite("../../../README", optionflags=doctest.ELLIPSIS)) + doctest.DocFileSuite("../../README", optionflags=doctest.ELLIPSIS)) return loader.suiteClass(testscenarios.generate_scenarios(standard_tests)) diff --git a/lib/testscenarios/tests/test_scenarios.py b/testscenarios/tests/test_scenarios.py index 6378d99..6378d99 100644 --- a/lib/testscenarios/tests/test_scenarios.py +++ b/testscenarios/tests/test_scenarios.py diff --git a/lib/testscenarios/tests/test_testcase.py b/testscenarios/tests/test_testcase.py index 4860758..4860758 100644 --- a/lib/testscenarios/tests/test_testcase.py +++ b/testscenarios/tests/test_testcase.py |