Example #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)
Example #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)
Example #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')
Example #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')
Example #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'), '?')
Example #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'), '?')