(self, test_data)
| 10 | class NetrcTestCase(unittest.TestCase): |
| 11 | |
| 12 | def make_nrc(self, test_data): |
| 13 | test_data = textwrap.dedent(test_data) |
| 14 | mode = 'w' |
| 15 | if sys.platform != 'cygwin': |
| 16 | mode += 't' |
| 17 | with open(temp_filename, mode, encoding="utf-8") as fp: |
| 18 | fp.write(test_data) |
| 19 | try: |
| 20 | nrc = netrc.netrc(temp_filename) |
| 21 | finally: |
| 22 | os.unlink(temp_filename) |
| 23 | return nrc |
| 24 | |
| 25 | def test_toplevel_non_ordered_tokens(self): |
| 26 | nrc = self.make_nrc("""\ |
no test coverage detected