def test_process_dd(): soup = BeautifulSoup(open(os.path.join(HERE, 'dd_example.html'))) assert (list(sphinx._process_dd('__call__()', soup)) == DD_EXAMPLE_PARSE_RESULT) assert list(sphinx._process_dd( 'foo()', BeautifulSoup('<dd><dl><dt>doesntmatchanything</dt></dl><dd>'))) == []
def test_process_dd(): soup = BeautifulSoup(open(os.path.join(HERE, 'dd_example.html'))) assert (list(sphinx._process_dd('__call__()', soup)) == DD_EXAMPLE_PARSE_RESULT) assert list( sphinx._process_dd( 'foo()', BeautifulSoup( '<dd><dl><dt>doesntmatchanything</dt></dl><dd>'))) == []
def test_process_dd(): soup = BeautifulSoup(open(os.path.join(HERE, "dd_example.html"))) assert list(sphinx._process_dd("__call__()", soup)) == DD_EXAMPLE_PARSE_RESULT assert list(sphinx._process_dd("foo()", BeautifulSoup("<dd><dl><dt>doesntmatchanything</dt></dl><dd>"))) == []
def test_failure(self): assert list(sphinx._process_dd( u'foo()', BeautifulSoup(u'<dd><dl><dt>doesntmatchanything</dt></dl><dd>')) ) == []
def test_success(self): soup = BeautifulSoup(open(os.path.join(HERE, 'dd_example.html'))) assert (list(sphinx._process_dd(u'__call__()', soup)) == DD_EXAMPLE_PARSE_RESULT)