(self)
| 118 | |
| 119 | # closure on the test params |
| 120 | def check_rubygem(self): |
| 121 | loc = self.get_test_loc(test_loc) |
| 122 | expected_json_loc = loc + '.json' |
| 123 | packages = list(rubygems.GemArchiveHandler.parse(location=loc)) |
| 124 | package = packages[0] |
| 125 | package.populate_license_fields() |
| 126 | package = [package.to_dict()] |
| 127 | if regen: |
| 128 | with io.open(expected_json_loc, 'w') as ex: |
| 129 | json.dump(package, ex, indent=2) |
| 130 | |
| 131 | with io.open(expected_json_loc, encoding='utf-8') as ex: |
| 132 | expected = json.load(ex) |
| 133 | assert package == expected |
| 134 | |
| 135 | if isinstance(test_name, bytes): |
| 136 | test_name = test_name.decode('utf-8') |
nothing calls this directly
no test coverage detected