(g)
| 888 | @pytest.fixture(scope="module") |
| 889 | def modern_bytecode(): |
| 890 | def func(g): |
| 891 | from gremlin_python.process.traversal import Order |
| 892 | from gremlin_python.process.traversal import P |
| 893 | |
| 894 | assert g.V().has("name", "marko").count().toList()[0] == 1 |
| 895 | assert g.V().has("person", "name", "marko").count().toList()[0] == 1 |
| 896 | assert ( |
| 897 | g.V().has("person", "name", "marko").outE("created").count().toList()[0] |
| 898 | == 1 |
| 899 | ) |
| 900 | assert ( |
| 901 | g.V() |
| 902 | .has("person", "name", "marko") |
| 903 | .outE("created") |
| 904 | .inV() |
| 905 | .count() |
| 906 | .toList()[0] |
| 907 | == 1 |
| 908 | ) |
| 909 | assert ( |
| 910 | g.V().has("person", "name", "marko").out("created").count().toList()[0] == 1 |
| 911 | ) |
| 912 | assert ( |
| 913 | g.V() |
| 914 | .has("person", "name", "marko") |
| 915 | .out("created") |
| 916 | .values("name") |
| 917 | .count() |
| 918 | .toList()[0] |
| 919 | == 1 |
| 920 | ) |
| 921 | assert ( |
| 922 | g.V() |
| 923 | .hasLabel("person") |
| 924 | .has("age", P.gt(30)) |
| 925 | .order() |
| 926 | .by("age", Order.desc) |
| 927 | .count() |
| 928 | .toList()[0] |
| 929 | == 2 |
| 930 | ) |
| 931 | |
| 932 | return func |
| 933 |
no test coverage detected