File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 15
15
__title__ = "pddl"
16
16
__description__ = "PDDL parser"
17
17
__url__ = "https://github.com/AI-Planning/pddl.git"
18
- __version__ = "0.4.2 "
18
+ __version__ = "0.4.3 "
19
19
__author__ = "Marco Favorito, Francesco Fuggitti, Christian Muise"
20
20
__author_email__ = (
21
21
"marco.favorito@gmail.com, francesco.fuggitti@gmail.com, christian.muise@queensu.ca"
Original file line number Diff line number Diff line change 14
14
import pytest
15
15
16
16
from pddl .logic .functions import Metric , NumericFunction , NumericValue
17
- from pddl .logic .helpers import variables
17
+ from pddl .logic .helpers import constants , variables
18
18
from pddl .parser .symbols import Symbols
19
19
20
20
@@ -24,7 +24,9 @@ class TestNumericFunction:
24
24
def setup_method (self ):
25
25
"""Set up the tests."""
26
26
self .a , self .b = variables ("a b" , types = ["type1" ])
27
+ self .c = constants ("c" )[0 ]
27
28
self .function = NumericFunction ("func" , self .a , self .b )
29
+ self .function2 = NumericFunction ("func2" , self .a , self .c )
28
30
29
31
def test_name (self ):
30
32
"""Test name getter."""
@@ -46,6 +48,7 @@ def test_to_equal(self):
46
48
def test_to_str (self ):
47
49
"""Test to string."""
48
50
assert str (self .function ) == f"({ self .function .name } { self .a } { self .b } )"
51
+ assert str (self .function2 ) == f"({ self .function2 .name } { self .a } { self .c } )"
49
52
50
53
def test_to_repr (self ):
51
54
"""Test to repr."""
Original file line number Diff line number Diff line change 13
13
"""This module contains tests for PDDL predicates."""
14
14
from pddl .core import Predicate
15
15
from pddl .logic .base import And
16
- from pddl .logic .helpers import variables
16
+ from pddl .logic .helpers import constants , variables
17
17
from pddl .logic .predicates import DerivedPredicate , EqualTo
18
18
19
19
@@ -23,7 +23,9 @@ class TestPredicateSimpleInitialisation:
23
23
def setup_method (self ):
24
24
"""Set up the tests."""
25
25
self .a , self .b = variables ("a b" )
26
+ self .c = constants ("c" )[0 ]
26
27
self .predicate = Predicate ("P" , self .a , self .b )
28
+ self .predicate2 = Predicate ("P2" , self .a , self .c )
27
29
28
30
def test_name (self ):
29
31
"""Test name getter."""
@@ -45,6 +47,7 @@ def test_to_equal(self):
45
47
def test_to_str (self ):
46
48
"""Test to string."""
47
49
assert str (self .predicate ) == f"({ self .predicate .name } { self .a } { self .b } )"
50
+ assert str (self .predicate2 ) == f"({ self .predicate2 .name } { self .a } { self .c } )"
48
51
49
52
def test_to_repr (self ):
50
53
"""Test to repr."""
You can’t perform that action at this time.
0 commit comments