本文整理汇总了Python中lettuce.fs.FileSystem.popd方法的典型用法代码示例。如果您正苦于以下问题:Python FileSystem.popd方法的具体用法?Python FileSystem.popd怎么用?Python FileSystem.popd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lettuce.fs.FileSystem
的用法示例。
在下文中一共展示了FileSystem.popd方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_failfast
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_failfast():
'passing --failfast to the harvest command will cause lettuce to stop in the first failure'
FileSystem.pushd(current_directory, "django", "celeries")
status, output = commands.getstatusoutput("python manage.py harvest --verbosity=3 --failfast")
the(output).should.contain("This one is present")
the(output).should.contain("Celeries before all")
the(output).should.contain("Celeries before harvest")
the(output).should.contain("Celeries before feature 'Test the django app leaves'")
the(output).should.contain("Celeries before scenario 'This one is present'")
the(output).should.contain("Celeries before step 'Given I say foo bar'")
the(output).should.contain("Celeries after step 'Given I say foo bar'")
the(output).should.contain("Celeries before step 'Then it fails'")
the(output).should.contain("Celeries after step 'Then it fails'")
the(output).should.contain("Celeries after scenario 'This one is present'")
the(output).should.contain("Celeries after feature 'Test the django app leaves'")
the(output).should.contain("Celeries after harvest")
the(output).should.contain("Celeries after all")
the(output).should_not.contain("This one is never called")
FileSystem.popd()
示例2: test_django_admin_media_serving_on_django_125
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_django_admin_media_serving_on_django_125():
'lettuce should serve admin static files properly on Django 1.2.5'
os.environ['PYTHONPATH'] = "%s:%s" % (
FileSystem.join(lib_directory, 'Django-1.2.5'),
OLD_PYTHONPATH,
)
FileSystem.pushd(current_directory, "django", "grocery")
status, out = commands.getstatusoutput(
"python manage.py harvest --verbosity=2 ./features/")
assert_equals(status, 0, out)
FileSystem.popd()
lines = out.splitlines()
f = '\n\n'
f += '*' * 100
f += '\n' + '\n'.join(lines)
assert u"Preparing to serve django's admin site static files..." in lines, f
assert u"Django's builtin server is running at 0.0.0.0:7000" in lines, f
assert u'Running on port 7000 ... OK' in lines, f
assert u'Fetching admin media ... OK' in lines, f
assert u'Fetching static files ... OK' in lines, f
assert u'Fetching CSS files: ... OK' in lines, f
assert u'Fetching javascript files: ... OK' in lines, f
示例3: test_django_admin_media_serving_forced_by_setting
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_django_admin_media_serving_forced_by_setting():
'settings.LETTUCE_SERVE_ADMIN_MEDIA forces lettuce to serve admin assets'
os.environ['PYTHONPATH'] = "%s:%s" % (
FileSystem.join(lib_directory, 'Django-1.3'),
OLD_PYTHONPATH,
)
FileSystem.pushd(current_directory, "django", "grocery")
extra_args = " --scenarios=1,3,4,5 --settings=settings_without_admin"
status, out = commands.getstatusoutput(
"python manage.py harvest --verbosity=2 ./features/ %s" % extra_args)
assert_equals(status, 0, out)
FileSystem.popd()
lines = out.splitlines()
assert u"Preparing to serve django's admin site static files " \
"(as per settings.LETTUCE_SERVE_ADMIN_MEDIA=True)..." in lines
assert u'Running on port 7000 ... OK' in lines
assert u'Fetching static files ... OK' in lines
assert u'Fetching CSS files: ... OK' in lines
assert u'Fetching javascript files: ... OK' in lines
assert u"Django's builtin server is running at 0.0.0.0:7000" in lines
# the scenario 2 is not suppose to run
assert u'Fetching admin media ... OK' not in lines
示例4: test_django_agains_alfaces
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_django_agains_alfaces():
'running the "harvest" django command with verbosity 3'
FileSystem.pushd(current_directory, "django", "alfaces")
status, out = commands.getstatusoutput("python manage.py harvest --verbosity=3")
assert_equals(status, 0)
FileSystem.popd()
示例5: test_harvest_sets_environment_variabled_for_gae
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_harvest_sets_environment_variabled_for_gae():
'harvest sets environment variables SERVER_NAME and SERVER_PORT in order to work with google app engine'
FileSystem.pushd(current_directory, "django", "brocolis")
status, out = commands.getstatusoutput("python manage.py harvest leaves/features/appengine.feature")
assert_equals(status, 0, out)
FileSystem.popd()
示例6: test_harvest_with_debug_mode_disabled
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_harvest_with_debug_mode_disabled():
'python manage.py harvest without turns settings.DEBUG=False'
FileSystem.pushd(current_directory, "django", "brocolis")
status, out = commands.getstatusoutput("python manage.py harvest leaves/features/disabled.feature")
assert_equals(status, 0, out)
FileSystem.popd()
示例7: test_model_creation
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_model_creation():
'Models are created through Lettuce steps'
FileSystem.pushd(current_directory, "django", "dill")
status, out = commands.getstatusoutput(
"python manage.py harvest -T leaves/features/create.feature")
assert_equals(status, 0, out)
FileSystem.popd()
示例8: test_django_agains_couves
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_django_agains_couves():
'it always call @after.all hooks, even after exceptions'
FileSystem.pushd(current_directory, "django", "couves")
status, out = commands.getstatusoutput("python manage.py harvest --verbosity=3")
assert "Couves before all" in out
assert "Couves after all" in out
FileSystem.popd()
示例9: test_django_against_cucumber_django_project
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_django_against_cucumber_django_project():
'testing all django hooks'
FileSystem.pushd(current_directory, "django", "cucumber")
status, out = commands.getstatusoutput("python manage.py harvest --verbosity=1")
assert "before harvest" in out
assert "after harvest" in out
FileSystem.popd()
示例10: test_django_no_test_database_option
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_django_no_test_database_option():
'test whether no test database is used if not wanted'
FileSystem.pushd(current_directory, "django", "grocery")
status, out = commands.getstatusoutput("python manage.py harvest --verbosity=2 --no-test-database ./features/")
assert_equals(status, 0)
FileSystem.popd()
assert_equals(re.match(r".*Creating test database for alias '\w+'\.\.\..*",out), None)
示例11: test_running_only_apps_within_lettuce_apps_setting
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_running_only_apps_within_lettuce_apps_setting():
'running the "harvest" will run only on configured apps if the setting LETTUCE_APPS is set'
FileSystem.pushd(current_directory, "django", "alfaces")
status, out = commands.getstatusoutput("python manage.py harvest --settings=onlyfoobarsettings --verbosity=3")
assert_equals(status, 0, out)
assert "Test the django app FOO BAR" in out
assert "Test the django app DO NOTHING" not in out
FileSystem.popd()
示例12: test_harvest_uses_test_runner
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_harvest_uses_test_runner():
'harvest uses LETTUCE_TEST_SERVER specified in settings'
FileSystem.pushd(current_directory, "django", "kale")
status, out = commands.getstatusoutput(
"python manage.py harvest -T leaves/features/modification.feature")
assert_equals(status, 0, out)
FileSystem.popd()
示例13: test_limit_by_app_getting_all_apps_by_comma
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_limit_by_app_getting_all_apps_by_comma():
'running "harvest" with --apps=multiple,apps,separated,by,comma'
FileSystem.pushd(current_directory, "django", "alfaces")
status, out = commands.getstatusoutput("python manage.py harvest --verbosity=3 --apps=foobar,donothing")
assert_equals(status, 0, out)
assert "Test the django app DO NOTHING" in out
assert "Test the django app FOO BAR" in out
FileSystem.popd()
示例14: test_running_only_specified_features
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_running_only_specified_features():
'it can run only the specified features, passing the file path'
FileSystem.pushd(current_directory, "django", "alfaces")
status, out = commands.getstatusoutput("python manage.py harvest --verbosity=3 foobar/features/foobar.feature")
assert_equals(status, 0, out)
assert "Test the django app FOO BAR" in out
assert "Test the django app DO NOTHING" not in out
FileSystem.popd()
示例15: test_excluding_apps_separated_by_comma
# 需要导入模块: from lettuce.fs import FileSystem [as 别名]
# 或者: from lettuce.fs.FileSystem import popd [as 别名]
def test_excluding_apps_separated_by_comma():
'running "harvest" with --avoid-apps=multiple,apps'
FileSystem.pushd(current_directory, "django", "alfaces")
status, out = commands.getstatusoutput("python manage.py harvest --verbosity=3 --avoid-apps=donothing,foobar")
assert_equals(status, 0)
assert "Test the django app DO NOTHING" not in out
assert "Test the django app FOO BAR" not in out
FileSystem.popd()