Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more tests #7

Open
VaeterchenFrost opened this issue Jun 1, 2020 · 3 comments
Open

Add more tests #7

VaeterchenFrost opened this issue Jun 1, 2020 · 3 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@VaeterchenFrost
Copy link
Owner

VaeterchenFrost commented Jun 1, 2020

Can regression-test more intermed steps.

Use functionality in folder \test

See https://changhsinlee.com/pytest-mock/ for mocking in pytest (testing database e.g.)

@VaeterchenFrost
Copy link
Owner Author

VaeterchenFrost commented Jun 1, 2020

version.py:

  • version (regex)
  • date (y-m-d)

@VaeterchenFrost VaeterchenFrost added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Jun 1, 2020
@VaeterchenFrost VaeterchenFrost added this to the First Release milestone Jun 1, 2020
@VaeterchenFrost VaeterchenFrost added the good first issue Good for newcomers label Jun 1, 2020
VaeterchenFrost added a commit that referenced this issue Jun 1, 2020
#7 Added Test for valid __date__ and __version__
VaeterchenFrost added a commit that referenced this issue Jun 3, 2020
@VaeterchenFrost
Copy link
Owner Author

#15

VaeterchenFrost added a commit that referenced this issue Jun 4, 2020
Now everything in test_gen_arg.
#7
VaeterchenFrost added a commit that referenced this issue Jun 4, 2020
Now test_append_svg parametrized.
Much more tightly arranged.
#13 #7
VaeterchenFrost added a commit that referenced this issue Jun 4, 2020
Manually reviewed the results and found no errors.
Could need some rounding, will add rounding next.
#13 #7
VaeterchenFrost added a commit that referenced this issue Jun 4, 2020
#7 Pinned and padded results
VaeterchenFrost added a commit that referenced this issue Jun 6, 2020
Factor out common  helper methods.
Makes files easier to read, imports easier.
#7
VaeterchenFrost added a commit that referenced this issue Jun 6, 2020
#19

* Update construct_dpdb_visu.py

Added main()
Moved import argparse to toplevel
in construct rename generalGraph to general_gr

* Update logging

* Update main docstring

+ Renamed ARGS to _args
+ argparse on toplevel import
+ sorted imports

* Update visualization.py

* Create logging.yml

* Remove logging.basicConfig

* Explicit logger names

Same as in logging.yml #19

* Update logging.yml

Update formatter

* Add utilities.py

Factor out common  helper methods.
Makes files easier to read, imports easier.
#7

* Move static methods to utilities

The static methods were generic enough to be a utility.
Other than that it helps to keep visualization.py more slim to just import these methods.
Some Format.

* Update read_cfg with read_yml_or_cfg

#19

Using utility method to read different cfg formats.

* Update test_bag_creation.py

Use utility

* Update logging Setup

Setup with utilities DefaultLoggingCfg

* Factored logging config dpdb into utilities

#19

* Some type refactoring

using int/float correctly

* Favtored logging out in visualization.py

Other main application that needs logging config.
#19

* loglevel default to None

loglevel=None means take what the config says.
The commandline parameter takes precedence over config.
If not None: update 'root' logger and it's handlers to that level. #19 #20

* Added logging.ini for comparison

Much more verbose, handlers+qualname needed most likely.
Updated logging.yml with WARNING default and all loggers use the root handler https://docs.python.org/3/howto/logging.html#logging-flow
#19

* Comments, Changelog

Comment basicConfig (provide information until logging is set up).

* Update svgjoin.py

Fixed wrong conversion to int.
Added better typing for f_transform
VaeterchenFrost added a commit that referenced this issue Jun 6, 2020
Test
- flatten
- convert_to_adj
- add_edge_to
#7
VaeterchenFrost referenced this issue Jun 25, 2020
testing dijkstra.py
VaeterchenFrost added a commit that referenced this issue Jun 26, 2020
VaeterchenFrost added a commit that referenced this issue Jul 11, 2020
VaeterchenFrost added a commit that referenced this issue Jul 11, 2020
Added
test_db_config
test_db2_config
test_db_passwd_config
#7
VaeterchenFrost added a commit that referenced this issue Jul 15, 2020
@VaeterchenFrost
Copy link
Owner Author

VaeterchenFrost added a commit that referenced this issue Jul 16, 2020
Using sys.exit as insurance that test call is executed correclty. #7

Needs import sys in module
VaeterchenFrost added a commit that referenced this issue Jul 16, 2020
* Create utilities.get_parser

Factor out common logic into utilities.
Removes some dependencies and code duplications.

* Use parser in main()

See answer https://stackoverflow.com/questions/37697502/python-unittest-for-argparse
for reference.
Also updated docstrings

* Make testable as init

* Refactor and test init()

Using sys.exit as insurance that test call is executed correclty. #7

Needs import sys in module

* Refactored calls in tests to main

Now even simpler tests! No argparse.

* format
@VaeterchenFrost VaeterchenFrost removed documentation Improvements or additions to documentation help wanted Extra attention is needed labels Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant