Example #1
0
 def test_pbr(self):
     root = self.useFixture(common.pbr_fixture).root
     project = update._read_project(root)
     self.expectThat(project['root'], matchers.Equals(root))
     setup_py = open(root + '/setup.py', 'rt').read()
     self.expectThat(project['setup.py'], matchers.Equals(setup_py))
     setup_cfg = open(root + '/setup.cfg', 'rt').read()
     self.expectThat(project['setup.cfg'], matchers.Equals(setup_cfg))
     self.expectThat(
         project['requirements'],
         matchers.KeysEqual('requirements.txt', 'test-requirements.txt'))
Example #2
0
def make_project(fixture):
    with fixture:
        return update._read_project(fixture.root)
Example #3
0
 def test_no_setup_py(self):
     root = self.useFixture(fixtures.TempDir()).path
     project = update._read_project(root)
     self.expectThat(
         project, matchers.Equals({'root': root, 'requirements': {}}))