Skip to content

Commit

Permalink
Dont raise SkipTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Jan 16, 2024
1 parent ac277a4 commit 5ee7291
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions 00.Setup/Setup.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"source": [
"import configparser\n",
"import os\n",
"from unittest import SkipTest\n",
"\n",
"OVERRIDE_EXISTING = False\n",
"FULL_PATH = os.path.expanduser('~/.spynnaker.cfg')\n",
Expand Down Expand Up @@ -50,23 +49,23 @@
" return True\n",
"\n",
" # SkipTest as unittest considers this neither a failure nor a success\n",
" raise SkipTest(f\"{FULL_PATH} already exists. \"\n",
" \"To replace it change OVERRIDE_EXISTING to True\")\n",
" print(f\"{FULL_PATH} already exists.)\n",
" print(\"To replace it change OVERRIDE_EXISTING to True\")\"\n",
" return False\n",
"\n",
"\n",
"check_should_create()\n",
"\n",
"# Make sure there is a spynnaker.cfg file\n",
"with open(FULL_PATH, 'w') as cfg:\n",
" cfg.write(\"[Machine]\\n\")\n",
" cfg.write(\"spalloc_server = https://spinnaker.cs.man.ac.uk/spalloc/\\n\")\n",
" cfg.write(\"\\n\")\n",
" cfg.write(\"[Java]\\n\")\n",
" cfg.write(\"use_java=True\\n\")\n",
" cfg.write(\"\\n\")\n",
" cfg.write(\"[Reports]\\n\")\n",
" cfg.write(\"read_provenance_data = False\\n\")\n",
" print(f\"New {FULL_PATH} created\")\n"
"if check_should_create():\n",
" with open(FULL_PATH, 'w') as cfg:\n",
" cfg.write(\"[Machine]\\n\")\n",
" cfg.write(\"spalloc_server = https://spinnaker.cs.man.ac.uk/spalloc/\\n\")\n",
" cfg.write(\"\\n\")\n",
" cfg.write(\"[Java]\\n\")\n",
" cfg.write(\"use_java=True\\n\")\n",
" cfg.write(\"\\n\")\n",
" cfg.write(\"[Reports]\\n\")\n",
" cfg.write(\"read_provenance_data = False\\n\")\n",
" print(f\"New {FULL_PATH} created\")\n"
]
},
{
Expand All @@ -82,8 +81,7 @@
]
}
],
"metadata": {
},
"metadata": {},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit 5ee7291

Please sign in to comment.