Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

node_integration_tests - Remove repeated part of datadirs #4396

Merged
merged 2 commits into from
Jul 1, 2019

Conversation

maaktweluit
Copy link
Contributor

old: scripts.node_integration_tests.tests.test_golem.GolemNodeTest.test_frame_restart
new:                                      test_golem.GolemNodeTest.test_frame_restart

Copy link

@Wiezzel Wiezzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok. Do you still need to replace __name__ though?

@maaktweluit
Copy link
Contributor Author

Was looking at that __name__ and it indeed seems not required.

@shadeofblue @etam do you know why it is there? can we safely remove it?

@codecov
Copy link

codecov bot commented Jun 27, 2019

Codecov Report

Merging #4396 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #4396   +/-   ##
========================================
  Coverage    88.49%   88.49%           
========================================
  Files          225      225           
  Lines        19845    19845           
========================================
  Hits         17561    17561           
  Misses        2284     2284

@mfranciszkiewicz
Copy link
Contributor

AFAICT replacing __name__ was supposed to have a similar result, GolemNodeTest.test_frame_restart in this example.

Copy link
Contributor

@mfranciszkiewicz mfranciszkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nicer to dynamically resolve the required path or build the relative id from the scratch. Some helpful definitions from the unittest module:

def id(self):
    return "%s.%s" % (strclass(self.__class__), self._testMethodName)
def strclass(cls):
    return "%s.%s" % (cls.__module__, cls.__qualname__)

@maaktweluit
Copy link
Contributor Author

@Wiezzel @mfranciszkiewicz Based on the review comments i updated the PR to use __name__ again for the replacement, so the test dir always starts with the file/module name.

@Krigpl Krigpl mentioned this pull request Jun 28, 2019
@maaktweluit maaktweluit merged commit 59482c8 into develop Jul 1, 2019
@maaktweluit maaktweluit deleted the mwu/int-short-folder branch July 1, 2019 11:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants