forked from test_framework/pytest-bdd
initial tests started
This commit is contained in:
parent
22186d60c9
commit
b5806ea6ed
|
@ -34,4 +34,11 @@ nosetests.xml
|
|||
.project
|
||||
.pydevproject
|
||||
|
||||
# Sublime
|
||||
/*.sublime-*
|
||||
|
||||
# virtualenv
|
||||
/.Python
|
||||
/lib
|
||||
/include
|
||||
/src
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
"""Configuration for pytest runner."""
|
||||
|
||||
pytest_plugins = "pytester"
|
|
@ -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*",
|
||||
])
|
20
setup.py
20
setup.py
|
@ -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,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue