(self)
| 801 | }) |
| 802 | |
| 803 | def test_parse_makefile_renamed_vars(self): |
| 804 | self.addCleanup(unlink, TESTFN) |
| 805 | with open(TESTFN, "w") as makefile: |
| 806 | print("var1=$(CFLAGS)", file=makefile) |
| 807 | print("PY_CFLAGS=-Wall $(CPPFLAGS)", file=makefile) |
| 808 | print("PY_LDFLAGS=-lm", file=makefile) |
| 809 | print("var2=$(LDFLAGS)", file=makefile) |
| 810 | print("var3=$(CPPFLAGS)", file=makefile) |
| 811 | with EnvironmentVarGuard() as env: |
| 812 | env.clear() |
| 813 | vars = _parse_makefile(TESTFN) |
| 814 | self.assertEqual(vars, { |
| 815 | 'var1': '-Wall', |
| 816 | 'CFLAGS': '-Wall', |
| 817 | 'PY_CFLAGS': '-Wall', |
| 818 | 'LDFLAGS': '-lm', |
| 819 | 'PY_LDFLAGS': '-lm', |
| 820 | 'var2': '-lm', |
| 821 | 'var3': '', |
| 822 | }) |
| 823 | |
| 824 | def test_parse_makefile_keep_unresolved(self): |
| 825 | self.addCleanup(unlink, TESTFN) |
nothing calls this directly
no test coverage detected