File: test_lexbor.yaml

package info (click to toggle)
python-selectolax 0.4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 708 kB
  • sloc: python: 2,239; makefile: 225
file content (66 lines) | stat: -rw-r--r-- 2,156 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
- case: html_parser_css_first_without_default
  parametrized:
    - strict: True
    - strict: False
  main: |
    from selectolax.parser import HTMLParser
    parser = HTMLParser("")
    node = parser.css_first(query="", strict= {{ strict }})
    reveal_type(node) # N: Revealed type is "Union[selectolax.parser.Node, None]"

- case: html_parser_css_first_with_none_default
  parametrized:
    - strict: True
    - strict: False
  main: |
    from selectolax.parser import HTMLParser
    parser = HTMLParser("")
    node = parser.css_first(query="",default=None,strict= {{strict}})
    reveal_type(node) # N: Revealed type is "Union[selectolax.parser.Node, None]"

- case: html_parser_css_first_with_default
  parametrized:
    - strict: True
    - strict: False
  main: |
    from selectolax.parser import HTMLParser
    parser = HTMLParser("")
    node = parser.css_first(query="",default="", strict ={{strict}})
    reveal_type(node) # N: Revealed type is "Union[selectolax.parser.Node, builtins.str]"


- case: lexbor_node_css_first_without_default
  parametrized:
    - strict: True
    - strict: False
  main: |
    from selectolax.parser import HTMLParser
    parser = HTMLParser("")
    node = parser.root
    if node is not None:
      res = node.css_first(query="", strict ={{strict}})
      reveal_type(res) # N: Revealed type is "Union[selectolax.parser.Node, None]"

- case: lexbor_node_css_first_with_none_default
  parametrized:
    - strict: True
    - strict: False
  main: |
    from selectolax.parser import HTMLParser
    parser = HTMLParser("")
    node = parser.root
    if node is not None:
      res = node.css_first(query="",default=None, strict ={{strict}})
      reveal_type(res) # N: Revealed type is "Union[selectolax.parser.Node, None]"

- case: lexbor_node_css_first_with_default
  parametrized:
    - strict: True
    - strict: False
  main: |
    from selectolax.parser import HTMLParser
    parser = HTMLParser("")
    node = parser.root
    if node is not None:
      res = node.css_first(query="",default="", strict ={{strict}})
      reveal_type(res) # N: Revealed type is "Union[selectolax.parser.Node, builtins.str]"