Repository: aiplan4eu/unified-planning
Issue: Tests not passing and dependency problem

**Describe the bug**
Tests use pytest, but that is not provided as a dependency.
In addition to this, at least one test is not passing:

```
$ bash run_tests.sh 
=========================================================================================== test session starts ===========================================================================================
platform linux -- Python 3.8.10, pytest-4.6.9, py-1.8.1, pluggy-0.13.0
Django settings: toru_django.settings (from environment variable)
rootdir: /home/calisi/AIPlan4EU/upf-experiments/unified-planning
plugins: pylama-7.4.3, mock-1.10.4, cov-2.8.1, django-3.5.1
collected 38 items / 1 errors / 37 selected                                                                                                                                                               

================================================================================================= ERRORS ==================================================================================================
_________________________________________________________________________ ERROR collecting unified_planning/test/test_pddl_io.py __________________________________________________________________________
ImportError while importing test module '/home/calisi/AIPlan4EU/upf-experiments/unified-planning/unified_planning/test/test_pddl_io.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
unified_planning/test/test_pddl_io.py:23: in <module>
    from unified_planning.io.pddl_reader import PDDLReader
unified_planning/io/pddl_reader.py:20: in <module>
    from pyparsing import Optional, one_of, Suppress, nestedExpr, Group, restOfLine # type: ignore
E   ImportError: cannot import name 'one_of' from 'pyparsing' (/usr/lib/python3/dist-packages/pyparsing.py)
========================================================================================= 1 error in 0.47 seconds =========================================================================================
```

The `one_of` is misspelled, it should be `oneOf`, at least for the current version of pyparsing installed on Ubuntu (that is `2.4.6-1`). Moreover, trying to correct the syntax, another issue happen:

```
$ bash run_tests.sh 
=========================================================================================== test session starts ===========================================================================================
platform linux -- Python 3.8.10, pytest-4.6.9, py-1.8.1, pluggy-0.13.0
Django settings: toru_django.settings (from environment variable)
rootdir: /home/calisi/AIPlan4EU/upf-experiments/unified-planning
plugins: pylama-7.4.3, mock-1.10.4, cov-2.8.1, django-3.5.1
collected 38 items / 1 errors / 37 selected                                                                                                                                                               

================================================================================================= ERRORS ==================================================================================================
_________________________________________________________________________ ERROR collecting unified_planning/test/test_pddl_io.py __________________________________________________________________________
ImportError while importing test module '/home/calisi/AIPlan4EU/upf-experiments/unified-planning/unified_planning/test/test_pddl_io.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
unified_planning/test/test_pddl_io.py:23: in <module>
    from unified_planning.io.pddl_reader import PDDLReader
unified_planning/io/pddl_reader.py:21: in <module>
    from pyparsing.results import ParseResults # type: ignore
E   ModuleNotFoundError: No module named 'pyparsing.results'; 'pyparsing' is not a package
========================================================================================= 1 error in 0.24 seconds =========================================================================================

```

So it could be that there is a problem with the version of pyparsing?

**Additional context**
I am running Ubuntu 20.04.03.


Changed files:
unified_planning/io/pddl_reader.py

diff --git a/unified_planning/io/pddl_reader.py b/unified_planning/io/pddl_reader.py
index 90c9bf43..244a5732 100644
--- a/unified_planning/io/pddl_reader.py
+++ b/unified_planning/io/pddl_reader.py
@@ -14,14 +14,20 @@
 #
 
 import unified_planning
+import pyparsing # type: ignore
 import typing
 from unified_planning.environment import Environment, get_env
-from pyparsing import Word, alphanums, alphas, ZeroOrMore, OneOrMore # type: ignore
-from pyparsing import Optional, one_of, Suppress, nestedExpr, Group, restOfLine # type: ignore
-from pyparsing.results import ParseResults # type: ignore
 from collections import OrderedDict
 from fractions import Fraction
 from typing import Dict, Union, Callable, List
+from pyparsing import Word, alphanums, alphas, ZeroOrMore, OneOrMore
+from pyparsing import Optional, Suppress, nestedExpr, Group, restOfLine
+if pyparsing.__version__ < '3.0.0':
+    from pyparsing import oneOf as one_of
+    from pyparsing import ParseResults
+else:
+    from pyparsing.results import ParseResults # type: ignore
+    from pyparsing import one_of
 
 
 class PDDLGrammar:
@@ -105,7 +111,7 @@ class PDDLGrammar:
     @property
     def parameters(self):
         return self._parameters
-      
+
 
 class PDDLReader:
     """