Skip to content

Commit 5293676

Browse files
committed
pytest is used
1 parent 32adb67 commit 5293676

28 files changed

+721
-791
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ or the closest endpoint(s) to the predetermined **point** otherwise.
1717
## Installation
1818
**Requirements**
1919
* `Python` 3.9+
20-
* `bs4` (tested to work with >= 0.0.1)
21-
* `chameleon` (tested to work with >= 3.9.1)
22-
* `lxml` (tested to work with >=4.8.0)
20+
* `bs4` (tested to work with >= 0.0.2)
21+
* `chameleon` (tested to work with >= 4.5.4)
22+
* `lxml` (tested to work with >=5.1.0)
23+
* `pytest` (tested to work with ==8.2.2)
2324

24-
**Note:** The `bs4` `chameleon` `lxml` packages can be installed by running `python3 -m pip install -r requirements.txt`
25+
**Note:** The packages can be installed by running `python3 -m pip install -r requirements.txt`
2526
***
2627

2728

@@ -38,7 +39,7 @@ For math analysis of input data **as a script**:
3839
* create data file with initial math sets
3940
* run `python run_math_sets_analyser.py`
4041

41-
**For testing** MathSetsAnalyser run `python -m unittest -v test_math_sets_analyser.py`
42+
**For testing** MathSetsAnalyser run `pytest`
4243
***
4344

4445
### The configuration file `config.ini` has the following structure:

errors/__init__.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
from .config_file_not_found import ConfigFileNotFoundError
2-
from .config_parsing import ConfigFileParsingError
3-
from .data_file_not_found import DataFileNotFoundError
4-
from .data_getting_failed import DataGettingError
5-
from .no_output_data import OutputDataError
6-
from .output_directory_not_found import OutputDirectoryNotFoundError
7-
from .output_file_generating_failed import OutputFileGeneratingError
1+
from .config_file_error import ConfigFileError
2+
from .data_file_error import DataFileError
3+
from .output_data_error import OutputDataError

errors/config_file_error.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class ConfigFileError(Exception):
2+
def __init__(self, error):
3+
self.error = error
4+
5+
def __str__(self):
6+
return f'Error! The config file {self.error}'
7+

errors/config_file_not_found.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

errors/config_parsing.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

errors/data_file_error.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class DataFileError(Exception):
2+
def __init__(self, error):
3+
self.error = error
4+
5+
def __str__(self):
6+
return f'Error! The data file {self.error}'

errors/data_file_not_found.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

errors/data_getting_failed.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

errors/no_output_data.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

errors/output_data_error.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class OutputDataError(Exception):
2+
def __init__(self, error):
3+
self.error = error
4+
5+
def __str__(self):
6+
return f'Error! The output {self.error}'

0 commit comments

Comments
 (0)