-
Notifications
You must be signed in to change notification settings - Fork 2
remove from . import * in unittests
#58
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
Changes from all commits
a141ac1
10da8b5
44b3f4a
1c094b4
dc7b65e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +0,0 @@ | ||
| #!/usr/bin/env python | ||
|
|
||
| from epmt.orm.sqlalchemy.models import Job, UnprocessedJob, Process | ||
| from epmt.orm.sqlalchemy.general import orm_get, orm_dump_schema, orm_commit, orm_is_query | ||
| from epmt.orm import db_session, setup_db, orm_db_provider, orm_in_memory, Operation | ||
| from epmt.epmtlib import timing, get_install_root, get_username, str_dict | ||
| from epmt.epmt_cmds import epmt_submit | ||
| import epmt.epmt_query as eq | ||
| import epmt.epmt_settings as settings | ||
| import os | ||
| import unittest | ||
| from sys import stderr | ||
| from glob import glob | ||
| from os import environ, path | ||
| from datetime import datetime | ||
| from contextlib import nullcontext | ||
|
|
||
| import logging | ||
| from io import StringIO | ||
| from json import loads | ||
|
|
||
| import sqlite3 | ||
| import pandas as pd | ||
| import numpy as np | ||
|
|
||
|
|
||
| # ok, i kind of see what was happening here. | ||
| # might take a bit to tease out but could be worth it for testing fidelity | ||
| # i can remove this as the default import for many testing routines one at a time and slowly | ||
| # add in the imports theyre actually testing. | ||
|
|
||
| from epmt.epmtlib import epmt_logging_init, capture | ||
| # ERROR | ||
| epmt_logging_init(-1) | ||
| # WARNING | ||
| # epmt_logging_init(0) | ||
| # INFO | ||
| # epmt_logging_init(1) | ||
| # DEBUG | ||
| # epmt_logging_init(2) | ||
|
|
||
|
|
||
| # this will be used repeatedly in the tests, so let's store it | ||
| # in a variable instead of repeatedly calling the function | ||
| install_root = get_install_root() | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,16 +1,19 @@ | ||||||
| #!/usr/bin/env python | ||||||
| from os import path | ||||||
| from contextlib import nullcontext | ||||||
| import unittest | ||||||
| from glob import glob | ||||||
|
|
||||||
| # the import below is crucial to get a sane test environment | ||||||
| from . import * | ||||||
| from epmt import epmt_query as eq, epmt_settings as settings | ||||||
| from epmt.orm import db_session, orm_in_memory, setup_db, orm_db_provider | ||||||
| from epmt.orm.sqlalchemy.models import UnprocessedJob | ||||||
| from epmt.epmtlib import timing, capture, get_install_root, epmt_logging_init | ||||||
| from epmt.epmt_cmds import epmt_dbsize, epmt_submit | ||||||
|
|
||||||
| from epmt.epmt_cmds import epmt_dbsize | ||||||
| from epmt.epmt_cmd_delete import epmt_delete_jobs | ||||||
| from epmt.epmt_cmd_list import ( epmt_list_jobs, epmt_list_procs, epmt_list_job_proc_tags, | ||||||
| epmt_list_refmodels, epmt_list_op_metrics, epmt_list_thread_metrics ) | ||||||
| from epmt.epmt_daemon import is_daemon_running, daemon_loop | ||||||
|
|
||||||
| # from epmt.orm.sqlalchemy.models import UnprocessedJob | ||||||
| # from os import path | ||||||
| install_root=get_install_root() | ||||||
|
||||||
| install_root=get_install_root() | |
| install_root = get_install_root() |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,12 +1,17 @@ | ||||||
| #!/usr/bin/env python | ||||||
|
|
||||||
| # the import below is crucial to get a sane test environment | ||||||
| from . import * | ||||||
| # from json import loads | ||||||
| from json import loads, dumps | ||||||
| from glob import glob | ||||||
| import unittest | ||||||
| from os import environ | ||||||
|
|
||||||
| import epmt.epmt_settings as settings | ||||||
| from epmt.orm import setup_db, db_session | ||||||
| import epmt.epmt_query as eq | ||||||
| import epmt.epmt_outliers as eod | ||||||
| from epmt.epmtlib import frozen_dict | ||||||
| from json import dumps | ||||||
| from epmt.epmtlib import frozen_dict, timing, capture, get_install_root | ||||||
| from epmt.epmt_cmds import epmt_submit | ||||||
| from epmt.orm.sqlalchemy.models import Job | ||||||
|
|
||||||
| install_root=get_install_root() | ||||||
|
||||||
| install_root=get_install_root() | |
| install_root = get_install_root() |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,18 +1,28 @@ | ||||||
| #!/usr/bin/env python | ||||||
| import unittest | ||||||
| from glob import glob | ||||||
| from datetime import datetime | ||||||
|
|
||||||
| # the import below is crucial to get a sane test environment | ||||||
| from . import * | ||||||
| import pandas as pd | ||||||
|
|
||||||
| from epmt.orm.sqlalchemy.models import Job, Process | ||||||
| from epmt.orm.sqlalchemy.general import orm_get, orm_commit, orm_is_query | ||||||
| import epmt.epmt_settings as settings | ||||||
| from epmt.epmt_cmds import epmt_submit | ||||||
| from epmt.orm import db_session, setup_db, Operation | ||||||
| from epmt.epmtlib import timing, capture, epmt_logging_init, get_install_root, str_dict | ||||||
| import epmt.epmt_query as eq | ||||||
|
|
||||||
| install_root=get_install_root() | ||||||
|
||||||
| install_root=get_install_root() | |
| install_root = get_install_root() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module 'os' is imported with both 'import' and 'import from'.