Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/konicai/sql-students
https://github.com/konicai/sql-students
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/konicai/sql-students
- Owner: Konicai
- Created: 2024-03-19T02:56:23.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-08-02T04:57:29.000Z (3 months ago)
- Last Synced: 2024-08-02T05:51:55.792Z (3 months ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# students
`students.py` contains a StudentsConnection instance to handle the connection and read/write to the database. `testing.py` contains `unittest` testing to automatically and independantly test methods.
The database it connects to should be initialized with `initializer.sql`. See the table within for details.#### Compilation and run instructions
To run all tests independantly and automatically, run the tests in `testing.py` using PyCharm (or equivalent) or by executing `testing.py`.
Note: your own database name, username, and password must be properly specified in `testing.py` before running it.If the results must be viewed in pgAmin, then enable `commit_changes` in `testing.py`. Otherwise, it is disabled by default, and the changes from each unit test are automatically rolled back.
Since each unit test is based on the initial conditions of the database, the database must be reset with `initializer.sql` before each unit test (if changes are being committed) is run. I recommend running unit tests individually using PyCharm or any equivalent IDE.