Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,6 @@ ENV/
!/sphinx/developerdoc.rst
!/sphinx/modules.rst
!/sphinx/quickstartdoc.rst
!/sphinx/userdoc.rst
!/sphinx/userdoc.rst

.vscode
1 change: 0 additions & 1 deletion aodncore/pipeline/db.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import csv
import psycopg2
from psycopg2 import sql, extras
import yaml
Expand Down
2 changes: 1 addition & 1 deletion aodncore/util/fileops.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def mkdir_p(path, mode=0o755):

def rm_f(path):
"""Remove a file, ignoring "file not found" errors (analogous to shell command 'rm -f')

:param path: path to file being deleted
:return: None
"""
Expand Down
2 changes: 1 addition & 1 deletion test_aodncore/pipeline/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def setUpClass(cls):
cls.bad_params = cls.params.copy()
cls.bad_params['password'] = 'not_a_real_password'


@classmethod
def tearDownClass(cls):
# Cleanup and stop the postgresql container
Expand Down Expand Up @@ -100,6 +99,7 @@ def test_roll_back(self):
self.assertEqual(0, count)

def test_commit(self):
self.drop_table(GOOD_TABLE_DEFN['name'])
with DatabaseInteractions(config=self.params, schema_base_path=TESTDATA_DIR, logger=self.test_logger) as db:
db.create_table_from_yaml_file(GOOD_TABLE_DEFN)

Expand Down
3 changes: 2 additions & 1 deletion test_aodncore/util/test_fileops.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ def test_rm_f(self):
rm_f(temp_file)
self.assertFalse(os.path.exists(temp_file))

with self.assertRaisesRegex(OSError, r'\[Errno 21\].*'):
# [Errno 1] or [Errno 21] depeding on the OS...
with self.assertRaises(OSError):
rm_f(temp_dir)

def test_rm_r(self):
Expand Down