How do I tell py.test to not prepend to sys.path? - pytest

When running py.test, it seems to automatically prepend your project's root directory (one above the last __init__.py) to sys.path
This is causing some issues for me, I looked through the docs but could not find any option for this.
Does anyone know a way?
Thanks

Related

Eclipse configuration file

Sorry for the silly question, but I cannot find the right solution, although I know it must be obvious.
I work on a Windows PC. I Installed eclipse in
c:\eclipse
I created a file called morpheus_eclipse.ini with some configuration for a project I am working on.
The framework needs to set this line
eclipse.pluginCustomization=path-to-file/morpheus_eclipse.ini
in
c:\eclipse\configuration\config.ini
There is a line in there with this format:
osgi.framework=file\:plugins/org.eclipse.osgi_3.14.0.v20190517-1309.jar
Should I do it like this:
eclipse.pluginCustomization=c:/eclipse/configuration/morpheus_eclipse.ini
or
eclipse.pluginCustomization=c:\eclipse\configuration\morphis_eclipse.ini
or
eclipse.pluginCustomization=file\:c:/eclipse/configuration/morphis_eclipse.ini
or
eclipse.pluginCustomization=file\:configuration/morphis_eclipse.ini
In this case, I read that paths are relative.
Thank you for your help

Why this script can go directory not exactly same?

I got a folder directory/A_/abc
the previous programmer was writing a shell script like this
location=`directory`
cd $location/A:/abc
then why i still can go directory/A_/abc ?
I google but still can't find the answer , anyone know?

Unable to read package metadata. This may be due to missing repodata directory. Please ensure that your install tree has been correctly generated

I am new for centos installation. I downloaded a minimul version of centos 6.5, around 339.7mb of size. I am trying to install this with GUI interface but I got an error after selecting the drive option, which comes after selecting the country.
This is complete message,
Unable to read package metadata. This may be due to missing repodata directory. Please ensure that your install tree has been correctly generated.
Failare:
repodata/743fec56b2af0ce8d6ec82c47a4efafc2a4d18cddfa9683f29611cb18d1a33de-primary.sqlite.bz2 from anaconda-CentOS-201311271240.i386: [Ermo 256] No more mirrors to try.
Sorry but I am new here, so I can't put the exact image here.
I believe that i had this same issue and was able to solve it.
The files under the /repodata folder are missing their file extensions and are not matching their full names in the "TRANS.TBL" file, under this same dir.
Rename all the files to match what is in the "TRANS.TBL" file, then try the install over again.
Please let everyone know if this works for you.
In the past i would just put a URL in that pointed to the correct files on a server, i feel that most people take this workaround and that's why it's not as hot of an item as it should be. I hope this gets fixed in the .ISO.
Thank you,
YourFriend
It worked for me.
I renamed all 8 files.
i.e. 0e371b19e547b9d7a7e8acc4b8c0c7c074509d33653cfaef9e8f4fd1d62d95de
0e371b19e547b9d7a7e8acc4b8c0c7c074509d33653cfaef9e8f4fd1d62d95de-primary.sqlite.bz2
The correct file name is given in file "repomd" under folder repodata
example - location href="repodata/b124f0ec5323cfee56b420906a3103f0daef656dde3f7ac8220120aa7504e57a-primary.xml.gz"
I had exactly the same issue ;
under "repodata" directory opened "repmod" xml file
Searched file name within repmond xml file
Found matching strings
Renamed 8 files as specified in .xml file
and it worked like a charm
Thanks to "Your Friend"
I had the same problem. Even if you manage to get past this step, you will encounter at a later point other errors related to filenames.
The root cause was using Unetbootin to create the bootable media. I switched to Rufus and everything works fine now.

Where do you put the dotcloud.yml file?

I have no idea what I'm doing -
Where do I put the dotcloud.yml file?
There isn't much help on this for people who don't knwo what they're doing. Insturcitons just say create the file.... where do you put it? In my pictures? In my documents? In a new folder called "pics of mj" on my desktop?
The dotcloud.yml file will generally be located in the directory containing the code of the application that you want to deploy on dotCloud.
I would recommend to check the dotCloud tutorials, e.g. http://docs.dotcloud.com/firststeps/quickstart/ ; I think it will explain all you need to know :-)
If you are referring to a specific guide or tutorial, don't hesitate to mention which one—if it's a doc maintained by dotCloud, they will certainly update it!
Probably in the root of your app/project directory, that's where I have a config.yml in a Ruby project. You can see an example of an yml file in the repo linked below.
https://github.com/ramaze/ramaze
I'm unfortunately not familiar with that deployment platform? So I'm not sure what the zoom command would do in that prompt.
For ruby it looks like the deploy command is dotcloud push [foldername] in the prompt.
http://docs.dotcloud.com/services/ruby/
There is a hint in the dotcloud.yml docs, but you're right, we need to make the location more explicit.
The dotcloud.yml file must go at the root of your source tree.

Howto set outputdirectory with google eclipse plugin?

I'm using the Google Eclipse Plugin for GWT development.
To do the configuration stuff there's a folder .settings with two files
com.google.gdt.eclipse.core.prefs and com.google.gwt.eclipse.core.prefs.
These files are a kind of propertie-files.
Now I'm trying to set two different directories for source and output files.
But I can't find any documentation about these files.
What I got till now is this.
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
lastWarOutDir=myoutputdirectory
warSrcDir=war
warSrcDirIsOutput=false
But using this, at compilationtime it opens a filechooser-Dialog on myoutputdirectory every time, waiting for confirmation.
So I ask, is there a solution to setup a different outputdirectory or does anybody know where I can find more Information about the usage of these setting-files.
My version of that file has an absolute path to the lastWarOutDir.
Maybe it keeps prompting you because it can't find myoutputdirectory (or maybe you just changed it for privacy's sake here).
In any case, if you right-click on the project > Run As > Run Configurations, go to the (x)= Arguments tab and you will see the -war argument containing the value of lastWarOutDir.
If you want to be prompted so that you can change the directory, you could delete all of the arguments, forcing the Google plugin to reconfigure.
I hope that helps. If not, please let us know what you really want to do here.
Maybe I misunderstand your problem. But why don't you just tell the GWT compiler where to output the files using the -war (-workDir, -gen and -extra) command line option? Same thing works for the GWT development mode...
http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#DevGuideCompilerOptions
http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#What_options_can_be_passed_to_development_mode