initial tests started

This commit is contained in:
Anatoly Bubenkov 2013-04-03 08:57:31 +03:00
parent 22186d60c9
commit b5806ea6ed
4 changed files with 44 additions and 1 deletions

7
.gitignore vendored
View File

@ -34,4 +34,11 @@ nosetests.xml
.project
.pydevproject
# Sublime
/*.sublime-*
# virtualenv
/.Python
/lib
/include
/src

View File

@ -0,0 +1,3 @@
"""Configuration for pytest runner."""
pytest_plugins = "pytester"

View File

@ -0,0 +1,15 @@
"""Tests for pytest-bdd-splinter subplugin."""
def test_pytest_scenario(testdir):
testdir.makepyfile("""
from pytest_bdd import scenario
@scenario('some feature', 'some_feature.txt')
def test_scenario():
pass
""")
result = testdir.runpytest("-v")
result.stdout.fnmatch_lines([
"*test_browser*PASS*",
])

View File

@ -1,6 +1,22 @@
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
from setuptools import setup, Command, find_packages
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import sys
import subprocess
errno = subprocess.call([sys.executable, '-m', 'pytest'])
raise SystemExit(errno)
packages = find_packages(os.path.dirname(os.path.abspath(__file__)))
@ -8,8 +24,10 @@ setup(
name='pytest-bdd',
description='BDD for pytest',
version='0.1',
cmdclass={'test': PyTest},
install_requires=[
'pytest',
],
tests_require=['mock'],
packages=packages,
)