Skip to content

Commit d6c1aed

Browse files
authored
Merge pull request #749 from jmmshn/test_patch_js
small fixes to tests
2 parents cce5005 + 0d13049 commit d6c1aed

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

atomate/utils/tests/test_database.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def tearDownClass(cls):
3838

3939
def test_s3_valid(self):
4040
with mock_s3():
41-
conn = boto3.client("s3")
41+
conn = boto3.resource('s3', region_name='us-east-1')
4242
conn.create_bucket(Bucket="test_bucket")
4343
index_store = MemoryStore()
4444
store = self.testdb.get_store("test")
@@ -51,7 +51,7 @@ def test_s3_valid(self):
5151

5252
def test_s3_not_valid(self):
5353
with mock_s3():
54-
conn = boto3.client("s3")
54+
conn = boto3.resource('s3', region_name='us-east-1')
5555
conn.create_bucket(Bucket="test_bucket_2")
5656
index_store = MemoryStore()
5757
store = self.testdb.get_store("test2")
@@ -62,7 +62,7 @@ def test_s3_not_valid(self):
6262

6363
def test_maggma_store_names(self):
6464
with mock_s3():
65-
conn = boto3.client("s3")
65+
conn = boto3.resource('s3', region_name='us-east-1')
6666
conn.create_bucket(Bucket="test_bucket")
6767
index_store = MemoryStore()
6868
store = self.testdb.get_store("test")
@@ -85,7 +85,7 @@ def test_uri(self):
8585
self.assertEqual(calc_db.collection.find_one()["data"], "12345")
8686

8787
with mock_s3():
88-
conn = boto3.client("s3")
88+
conn = boto3.resource('s3', region_name='us-east-1')
8989
conn.create_bucket(Bucket="test_bucket")
9090
uri_db = TestToDb.from_db_file(db_dir + "/db_aws_uri.json")
9191
store = uri_db.get_store("test")

atomate/vasp/workflows/tests/test_insertion_workflow.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
class TestInsertionWorkflow(AtomateTest):
2323
def setUp(self):
2424
super().setUp()
25-
input_output_dirs = ref_dir / "insertion_wf"
26-
names = os.walk(input_output_dirs).__next__()[1]
27-
calc_dirs = {n_: input_output_dirs / n_ for n_ in names}
25+
names = os.walk(wf_dir).__next__()[1]
26+
calc_dirs = {n_: wf_dir / n_ for n_ in names}
2827
base_struct = Structure.from_file(wf_dir / "YPO4-static/inputs/POSCAR")
2928
sm = StructureMatcher(ltol=0.6, stol=0.6, angle_tol=9)
3029

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ pymatgen
1212
pymongo
1313
pyyaml==5.4.1
1414
ruamel.yaml==0.17.9
15-
scipy==1.7.0
15+
scipy==1.7.2
1616
tqdm==4.61.1

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ per-file-ignores =
2121

2222
[isort]
2323
profile = black
24+
25+
[tool:pytest]
26+
addopts = --ignore=atomate/qchem/test_files

0 commit comments

Comments
 (0)