Example #1
0
    def test_simple(self):
        with temppath('foo.ini') as path:
            with open(path,  'w') as f:
                f.write(simple)
            pkg = os.path.splitext(path)[0]
            out = read_config(pkg)

        assert_(out.cflags() == simple_d['cflags'])
        assert_(out.libs() == simple_d['libflags'])
        assert_(out.name == simple_d['name'])
        assert_(out.version == simple_d['version'])
Example #2
0
    def test_simple(self):
        with temppath('foo.ini') as path:
            with open(path, 'w') as f:
                f.write(simple)
            pkg = os.path.splitext(path)[0]
            out = read_config(pkg)

        assert_(out.cflags() == simple_d['cflags'])
        assert_(out.libs() == simple_d['libflags'])
        assert_(out.name == simple_d['name'])
        assert_(out.version == simple_d['version'])
Example #3
0
    def test_simple(self):
        with temppath("foo.ini") as path:
            with open(path, "w") as f:
                f.write(simple)
            pkg = os.path.splitext(path)[0]
            out = read_config(pkg)

        assert_(out.cflags() == simple_d["cflags"])
        assert_(out.libs() == simple_d["libflags"])
        assert_(out.name == simple_d["name"])
        assert_(out.version == simple_d["version"])
Example #4
0
    def test_simple_variable(self):
        with temppath('foo.ini') as path:
            with open(path, 'w') as f:
                f.write(simple_variable)
            pkg = os.path.splitext(path)[0]
            out = read_config(pkg)

        assert_(out.cflags() == simple_variable_d['cflags'])
        assert_(out.libs() == simple_variable_d['libflags'])
        assert_(out.name == simple_variable_d['name'])
        assert_(out.version == simple_variable_d['version'])
        out.vars['prefix'] = '/Users/david'
        assert_(out.cflags() == '-I/Users/david/include')
Example #5
0
    def test_simple_variable(self):
        with temppath('foo.ini') as path:
            with open(path,  'w') as f:
                f.write(simple_variable)
            pkg = os.path.splitext(path)[0]
            out = read_config(pkg)

        assert_(out.cflags() == simple_variable_d['cflags'])
        assert_(out.libs() == simple_variable_d['libflags'])
        assert_(out.name == simple_variable_d['name'])
        assert_(out.version == simple_variable_d['version'])
        out.vars['prefix'] = '/Users/david'
        assert_(out.cflags() == '-I/Users/david/include')
Example #6
0
    def test_simple_variable(self):
        with temppath("foo.ini") as path:
            with open(path, "w") as f:
                f.write(simple_variable)
            pkg = os.path.splitext(path)[0]
            out = read_config(pkg)

        assert_(out.cflags() == simple_variable_d["cflags"])
        assert_(out.libs() == simple_variable_d["libflags"])
        assert_(out.name == simple_variable_d["name"])
        assert_(out.version == simple_variable_d["version"])
        out.vars["prefix"] = "/Users/david"
        assert_(out.cflags() == "-I/Users/david/include")
Example #7
0
    def test_simple(self):
        fd, filename = mkstemp('foo.ini')
        try:
            pkg = os.path.splitext(filename)[0]
            try:
                os.write(fd, simple)
            finally:
                os.close(fd)

            out = read_config(pkg)
            self.failUnless(out.cflags() == simple_d['cflags'])
            self.failUnless(out.libs() == simple_d['libflags'])
            self.failUnless(out.name == simple_d['name'])
            self.failUnless(out.version == simple_d['version'])
        finally:
            os.remove(filename)
    def test_simple(self):
        fd, filename = mkstemp('foo.ini')
        try:
            pkg = os.path.splitext(filename)[0]
            try:
                os.write(fd, simple.encode('ascii'))
            finally:
                os.close(fd)

            out = read_config(pkg)
            self.assertTrue(out.cflags() == simple_d['cflags'])
            self.assertTrue(out.libs() == simple_d['libflags'])
            self.assertTrue(out.name == simple_d['name'])
            self.assertTrue(out.version == simple_d['version'])
        finally:
            os.remove(filename)
Example #9
0
    def test_simple(self):
        fd, filename = mkstemp("foo.ini")
        try:
            pkg = os.path.splitext(filename)[0]
            try:
                os.write(fd, simple.encode("ascii"))
            finally:
                os.close(fd)

            out = read_config(pkg)
            self.assertTrue(out.cflags() == simple_d["cflags"])
            self.assertTrue(out.libs() == simple_d["libflags"])
            self.assertTrue(out.name == simple_d["name"])
            self.assertTrue(out.version == simple_d["version"])
        finally:
            os.remove(filename)
Example #10
0
    def test_simple_variable(self):
        fd, filename = mkstemp('foo.ini')
        try:
            pkg = os.path.splitext(filename)[0]
            try:
                os.write(fd, simple_variable)
            finally:
                os.close(fd)

            out = read_config(pkg)
            self.failUnless(out.cflags() == simple_variable_d['cflags'])
            self.failUnless(out.libs() == simple_variable_d['libflags'])
            self.failUnless(out.name == simple_variable_d['name'])
            self.failUnless(out.version == simple_variable_d['version'])

            out.vars['prefix'] = '/Users/david'
            self.failUnless(out.cflags() == '-I/Users/david/include')
        finally:
            os.remove(filename)
    def test_simple_variable(self):
        fd, filename = mkstemp('foo.ini')
        try:
            pkg = os.path.splitext(filename)[0]
            try:
                os.write(fd, simple_variable)
            finally:
                os.close(fd)

            out = read_config(pkg)
            self.failUnless(out.cflags() == simple_variable_d['cflags'])
            self.failUnless(out.libs() == simple_variable_d['libflags'])
            self.failUnless(out.name == simple_variable_d['name'])
            self.failUnless(out.version == simple_variable_d['version'])

            out.vars['prefix'] = '/Users/david'
            self.failUnless(out.cflags() == '-I/Users/david/include')
        finally:
            os.remove(filename)
Example #12
0
    def test_simple_variable(self):
        fd, filename = mkstemp('foo.ini')
        try:
            pkg = os.path.splitext(filename)[0]
            try:
                os.write(fd, simple_variable.encode('ascii'))
            finally:
                os.close(fd)

            out = read_config(pkg)
            self.assertTrue(out.cflags() == simple_variable_d['cflags'])
            self.assertTrue(out.libs() == simple_variable_d['libflags'])
            self.assertTrue(out.name == simple_variable_d['name'])
            self.assertTrue(out.version == simple_variable_d['version'])

            out.vars['prefix'] = '~'
            self.assertTrue(out.cflags() == '-I~/include')
        finally:
            os.remove(filename)