小编Adi*_*ava的帖子

如何编写pep8配置(pep8.rc)文件?

我找到了pep8的文档但是无法理解如何编写这些文档.我甚至找不到任何除了设置max-line-length和ignore之外的选项的例子.

我正在尝试编写一个.pep8.rc文件,其中包括我需要执行以下操作:

  • 启用show source
  • 启用统计
  • 启用计数
  • 排除目录(例如./random)

有人可以回答一个例子或链接到一个?

python pep8 pep

24
推荐指数
1
解决办法
8370
查看次数

对于具有看似随机错误的所有URL,Selenium测试失败

我正在使用Ubuntu 16.04.我在虚拟环境中设置了Django 1.9.7和selenium 2.53.5.

我正在关注Harry JW Percival的书"使用Python进行测试驱动开发",我目前正在第4章中进行功能测试的第一个教程("使用Selenium测试用户交互").代码如下

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import unittest

class NewVisitorTest(unittest.TestCase):

     def setUp(self):
        self.browser = webdriver.Firefox()
        self.browser.implicitly_wait(3)

    def tearDown(self):
        self.browser.quit()

    def test_can_start_a_list_and_retrieve_it_later(self):
        # Edith has heard about a cool new online to-do app. She goes to check out its homepage
        self.browser.get('http://localhost:8000')

        # She notices the page title and header mention to-do lists
        self.assertIn('To-Do', self.browser.title)
        header_text = self.browser.find_element_by_tag_name('h1').text
        self.assertIn('To-Do', header_text)

        # She is invited to enter a to-do item straight away
        inputbox = …
Run Code Online (Sandbox Code Playgroud)

python django selenium virtualenv virtualenvwrapper

5
推荐指数
1
解决办法
3246
查看次数

标签 统计

python ×2

django ×1

pep ×1

pep8 ×1

selenium ×1

virtualenv ×1

virtualenvwrapper ×1