Ejemplo n.º 1
0
 def test18(self):
     """test remove (also check if the files were removed)"""
     path = self.fixture_file('prj2')
     prj = Project(path)
     self.assertEqual(prj._status('bar'), 'A')
     prj.remove('bar')
     self.assertEqual(prj._status('bar'), '?')
     self._not_exists(path, 'bar')
     self._not_exists(path, 'bar', data=True)
Ejemplo n.º 2
0
 def test18(self):
     """test remove (also check if the files were removed)"""
     path = self.fixture_file('prj2')
     prj = Project(path)
     self.assertEqual(prj._status('bar'), 'A')
     prj.remove('bar')
     self.assertEqual(prj._status('bar'), '?')
     self._not_exists(path, 'bar')
     self._not_exists(path, 'bar', data=True)
Ejemplo n.º 3
0
 def test19(self):
     """test remove (all files removed)"""
     path = self.fixture_file('prj2')
     prj = Project(path)
     pkg = prj.package('foo')
     self.assertEqual(pkg.status('file'), ' ')
     self.assertEqual(prj._status('foo'), ' ')
     self._exists(path, 'foo', 'file')
     prj.remove('foo')
     self._exists(path, 'foo')
     self._not_exists(path, 'foo', 'file')
     self.assertEqual(prj._status('foo'), 'D')
     pkg = prj.package('foo')
     self.assertEqual(pkg.status('file'), 'D')
Ejemplo n.º 4
0
 def test19(self):
     """test remove (all files removed)"""
     path = self.fixture_file('prj2')
     prj = Project(path)
     pkg = prj.package('foo')
     self.assertEqual(pkg.status('file'), ' ')
     self.assertEqual(prj._status('foo'), ' ')
     self._exists(path, 'foo', 'file')
     prj.remove('foo')
     self._exists(path, 'foo')
     self._not_exists(path, 'foo', 'file')
     self.assertEqual(prj._status('foo'), 'D')
     pkg = prj.package('foo')
     self.assertEqual(pkg.status('file'), 'D')
Ejemplo n.º 5
0
 def test15(self):
     """test remove"""
     path = self.fixture_file('prj2')
     prj = Project(path)
     # delete foo
     self.assertEqual(prj._status('foo'), ' ')
     prj.remove('foo')
     self.assertEqual(prj._status('foo'), 'D')
     self.assertTrue(os.path.exists(self.fixture_file('prj2', 'foo')))
     # delete xxx
     self.assertEqual(prj._status('xxx'), '!')
     prj.remove('xxx')
     self.assertEqual(prj._status('xxx'), 'D')
     # delete bar
     self.assertEqual(prj._status('bar'), 'A')
     prj.remove('bar')
     self.assertEqual(prj._status('bar'), '?')
Ejemplo n.º 6
0
 def test15(self):
     """test remove"""
     path = self.fixture_file('prj2')
     prj = Project(path)
     # delete foo
     self.assertEqual(prj._status('foo'), ' ')
     prj.remove('foo')
     self.assertEqual(prj._status('foo'), 'D')
     self.assertTrue(os.path.exists(self.fixture_file('prj2', 'foo')))
     # delete xxx
     self.assertEqual(prj._status('xxx'), '!')
     prj.remove('xxx')
     self.assertEqual(prj._status('xxx'), 'D')
     # delete bar
     self.assertEqual(prj._status('bar'), 'A')
     prj.remove('bar')
     self.assertEqual(prj._status('bar'), '?')