我找到了pep8的文档但是无法理解如何编写这些文档.我甚至找不到任何除了设置max-line-length和ignore之外的选项的例子.
我正在尝试编写一个.pep8.rc文件,其中包括我需要执行以下操作:
./random)有人可以回答一个例子或链接到一个?
我正在使用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)