-
Notifications
You must be signed in to change notification settings - Fork 79
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
Make tests pass #446
Make tests pass #446
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #446 +/- ##
=======================================
Coverage 89.44% 89.44%
=======================================
Files 34 34
Lines 2407 2407
=======================================
Hits 2153 2153
Misses 254 254 ☔ View full report in Codecov by Sentry. |
from setuptools import setup, find_packages | ||
|
||
|
||
about = {} | ||
here = os.path.abspath(os.path.dirname(__file__)) |
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.
The use of __file__
here was problematic due to some weird code calling setup.py
with exec
, and given the purpose for which it was being used here, this seems like the cleaner fix to me.
r'Building registry\.io/user/project:1\.0\.' | ||
r'Steps: 0%\| +\| 0/1' | ||
r'Steps: 100%\|█+\| 3/3' | ||
r'The image registry\.io/user/project:1\.0 build is completed\.' |
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.
invoke
above allows specifying a terminal width, but this seemed easier than to find the right width for some reason. But I can try the width approach if you prefer.
if os.path.exists(self.status_file): | ||
os.remove(self.status_file) | ||
|
||
def tearDown(self): | ||
os.chdir(self.curdir) |
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.
The lack of this was causing trouble down the line when executing all tests.
@@ -25,7 +25,7 @@ def setUp(self): | |||
self.curdir = os.getcwd() | |||
self.fake_requester = FakeRequester() | |||
deploy_egg.utils.make_deploy_request = self.fake_requester.fake_request | |||
self.tmp_dir = tempfile.mktemp(prefix="shub-test-deploy-eggs") | |||
self.tmp_dir = tempfile.mkdtemp(prefix="shub-test-deploy-eggs") |
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.
Not sure how it ever worked before.
@@ -35,7 +35,8 @@ def tearDown(self): | |||
def test_parses_project_information_correctly(self): | |||
# this test's assertions are based on the values | |||
# defined on this folder's setup.py file | |||
shutil.copytree('tests/samples/deploy_egg_sample_project/', self.tmp_dir) | |||
shutil.rmtree(self.tmp_dir) | |||
shutil.copytree('tests/samples/deploy_egg_sample_project', self.tmp_dir) |
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.
Had started failing due to self.tmp_dir
existing already, not sure how it worked before either.
Post-merge to-do: