Skip to content

Commit 1632cc7

Browse files
Add vscode configuration.
Fix bug in tests.
1 parent 49b6219 commit 1632cc7

File tree

5 files changed

+34
-2
lines changed

5 files changed

+34
-2
lines changed

.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Debug oneWaySync",
9+
"type": "debugpy",
10+
"request": "launch",
11+
"program": "one_way_sync.py",
12+
"console": "integratedTerminal",
13+
"justMyCode": false,
14+
"cwd": "${workspaceFolder}/source/",
15+
"env": {"http_proxy":"", "https_proxy": ""},
16+
}
17+
]
18+
}

.vscode/settings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"python.testing.pytestArgs": [
3+
"test"
4+
],
5+
"python.testing.unittestEnabled": false,
6+
"python.testing.pytestEnabled": true,
7+
"debugpy.debugJustMyCode": false,
8+
"flake8.args": [
9+
"--ignore=E261",
10+
"--max-line-length=120",
11+
]
12+
}

test/fixtures/common_fixtures.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ def auth_cfg(tmp_path_factory):
4545
if os.path.exists(src_path):
4646
shutil.copy(src_path, cfg_test)
4747
os.chdir(tmp)
48+
else:
49+
raise AssertionError
4850

4951
yield
5052
# clean-up

test/fixtures/helpers.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ class TestHelpers:
1313
@staticmethod
1414
def get_root():
1515
dir_path = os.path.dirname(os.path.realpath(__file__))
16-
root = dir_path.split("Project_Hype-Berry")[0]
17-
root = os.path.join(root, "Project_Hype-Berry")
16+
root = dir_path.split("test")[0]
1817
return root
1918

2019
@staticmethod

test/integration/oneWaySyncTests/end_to_end_integration_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def test_end_to_end(self,
131131
# mock read in of pickle file
132132
pkl_file = mock()
133133
pkl_load = mock()
134+
when2(open, ...).thenCallOriginalImplementation()
134135
when2(open, 'oneWay_matchDict.pkl', 'rb').thenReturn(pkl_file)
135136
when(pickle).Unpickler(...).thenReturn(pkl_load)
136137
when(pkl_load).load().thenReturn({})

0 commit comments

Comments
 (0)