My Batch apex is covering only 50% test coverage can anyone help me to make it 100% coverage
How do I increase my code coverage, or why can't I cover these lines?
Modify obj after import using python I am trying to modify an object after importing it. This post is related to   import bpy full_path_to_file = "C:\\Users\\xyz\\Documents\\test.obj" bpy.ops.import_scene.obj(filepath=full_path_to_file) # create the material mat = bpy.data.materials.new('MaterialName') mat.diffuse_color = (1.0,0.0,1.0) mat.diffuse_shader = 'LAMBERT' mat.diffuse_intensity = 1.0  # get the object obj = bpy.data.objects['Cube']  # get the material mat = bpy.data.materials['MaterialName']  # assign material to object obj.data.materials.append(mat)   I wanted to add a material to the imported object but that is not happening. So I tried to scale it even that is not happening.  I realized that no operation is being performed on the imported objects. But the same operations are executing on the objects that are created (i.e. not imported).  Any help would be appreciated. How to delete a file in Windows with a too long filename? My wife has several files and folders that somehow ended up having filenames that have caused them to be undeleteable (can't be deleted) by normal means or via the command line. I believe the filenames are too long due to the depth of the folder structures. Does anyone know of a good utility for cleaning up files like this? I'm trying to install pandas. When I do, it's automatically installing to the python installation for v 2.7.   How do I force pandas to install to the python 3.5 installation? This is an old problem that deserves a bugfix, but it's getting beyond a joke now and I can't seem to work around it.  I keep getting the dreaded failed To download extra data files error in relation to ttf-mscorefonts-installer:    Repeatedly asking it to try again doesn't help, additionally, repeatedly trying-  sudo rm -rf /var/lib/update-notifier/package-data-downloads/partial/* sudo apt-get --purge --reinstall install ttf-mscorefonts-installer   Isn't working either.  I just get at least one 404 error from one of the sourceforge links that stops it working-  Reading package lists... Done Building dependency tree        Reading state information... Done 0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 20 not to upgrade. Need to get 0 B/29.5 kB of archives. After this operation, 0 B of additional disk space will be used. Preconfiguring packages ... (Reading database ... 352049 files and directories currently installed.) Preparing to unpack .../ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb ... mscorefonts-eula license has already been accepted Unpacking ttf-mscorefonts-installer (3.4+nmu1ubuntu2) over (3.4+nmu1ubuntu2) ... Processing triggers for fontconfig (2.11.94-0ubuntu1.1) ... Processing triggers for update-notifier-common (3.168.2) ... ttf-mscorefonts-installer: processing... ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/andale32.exe Get:1 http://downloads.sourceforge.net/corefonts/andale32.exe [198 kB] Fetched 198 kB in 0s (339 kB/s)                                                 W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/andale32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/arial32.exe Get:1 http://downloads.sourceforge.net/corefonts/arial32.exe [554 kB] Fetched 554 kB in 0s (575 kB/s)                                                 W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/arial32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/arialb32.exe Get:1 http://downloads.sourceforge.net/corefonts/arialb32.exe [168 kB] Fetched 168 kB in 0s (306 kB/s)                                                 W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/arialb32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) ttf-mscorefonts-installer: downloading http://downloads.sourceforge.net/corefonts/comic32.exe Err:1 http://downloads.sourceforge.net/corefonts/comic32.exe   404  Not Found W: Can't drop privileges for downloading as file '/var/lib/update-notifier/package-data-downloads/partial/comic32.exe' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) E: Failed to fetch https://netix.dl.sourceforge.net/project/corefonts/the fonts/final/comic32.exe  404  Not Found  E: Download Failed Setting up ttf-mscorefonts-installer (3.4+nmu1ubuntu2) ...   The specific point at which it fails to download changed - it seems to be a sourceforge reliability problem, but this has now been going on weeks and results in annoying popups as above all the time.  How do we get this fixed and/or how can I work around it for now. Can people PLEASE spell out their slang acronyms $G$ is non abelian simple group of order $<100$ then $G\cong A_5$ Seeking free elevation data for Europe? Where can I find free elevation data for Europe?   The available resolutions and terms of use are important details that I also seek. When I'm viewing a user profile, it's more often than not to gauge this user within the community. How long they have been a member, how active they have been, when was their last activity and of course, what content are they contributing. This is accentuated when the user in question is a relatively new user. I would want to know this in order to make my response or comment more informative and to not be too harsh on inexperienced users.  One good measure I use to identify a new user is their join date. I would like to request that the "member for" field be added to the profile page for users on the mobile application just as it is when viewing the desktop version.  The "last seen" field would also be useful. It's useful to me on the desktop version to know more or less when/if to expect a response from a user after leaving them a comment/answer. It would useful on the mobile version for the same reasons.    I just realized that this information is available on the mobile version of the webiste. If it was decided that this information is important enough to also appear on the mobile web version, why not include it on the native mobile applications? Is it appropriate to ask what a public beta sites needs to graduate? I came across  today in a separate question:     The only thing holding [Code Review] back from graduating is the lack of high rep users - there just aren't enough 1k+, 3k+ users on the site, and it can't quite yet sustain an election. Every single thing about CR is ready but that - it's really just a matter of time at this point (and, well, voting).   Almost all the posts about what the criteria for graduation are vague and don't mention specific examples:       The first question specifically asks about 2 beta (now graduated) sites, but the answer is more general, "Look at this blog" with general guidance.  How often are site stats reviewed by the team in charge of betas? And is it appropriate to create meta questions asking where a site stands to get feedback to the community on how to improve? Per the title, does $\displaystyle\sum_{n=1}^{\infty} \sin(\pi(2+\sqrt{3})^n)$ converge? Converge absolutely?   I'm stuck on this question, not sure how to approach it.  Thank you! If $\gcd(a,b)=1$, then $\gcd(a+b,a^2 -ab+b^2)=1$ or $3$. Adding arrows in curves Word for a modified version of a quote Derivation of $E=pc$ for a massless particle? In classical mechanics, massless particles don't exist because for $m=0$, $p=0$.  The relativistic relation between energy, mass and spatial momentum is: $E^2= (pc)^2 + (mc^2)^2$ . So it is said that setting $m=0$ in the first equation you get $E=pc$.  How could setting $m=0$ in that equation give you $E=pc$ whilst $p$ appears in the equation and we know $p=γmu$? If you set $m=0$ you will have indeterminacy due to "$γm$". It seems to me like we are doing a "trick" in order to get the $E=pc$. Perhaps there is another proof for this relation? When looking at used camera bodies, a question that comes up a lot, is "how many shutter actuations, or clicks, does it have?"   What I am wondering is, how many is too many. In other words, is there a reference for knowing when a sensor is more likely to go? How should I judge a camera body with 20000 vs 5000? Is that a significant difference, or is that not even relevant.  Obviously this might something that is dependent on model, so if there is some information based on model that would be even more interesting.  One of the guys at Canon Tech Support said that this is completely irrelevant for the Rebel series cameras, but he is obviously slightly biased. :) When the loop is the figure shown below will be rotated in clockwise direction the the slip ring connected to the red segment of the loop will give us the positive voltage and the slip ring connected to the black segment of the loop will give us negative voltage according to the Flemings right hand rule.  What if the loop is rotated in counter clockwise direction ? Will the slip rings provide us the same polarities which they were giving when the loop was moving clockwise ?  Plus  The voltage from the loop is given by the equation.  V(t) = Vmaximum * sin (theta)  Where theta is the positive angle the red segment makes in the clockwise direction or in counter clockwise direction from this position ? How to know if the system console is open? Can we know, with python, if the system console of blender is open? I know that we can open or close it with this function:  bpy.ops.wm.console_toggle()   But it doesn't return the 'state' of the system console like open or closed (True,False).  I want to be sure that the console is open when i execute one of my script. Which shells don't support dollar-parenthesis expansion, and demand backticks? I have seen the options such as a4paper, a5paper, letterpaper, etc... to go in the square brackets after \documentclass, but what I want is 8.25 inches width by 10.75 inches height for one document and 6 inches width by 9 inches height for another one. How is this done? "The ones" or "those"? I recently corrected  &quot;ghettos, such as the ones found...&quot; to &quot;ghettos, such as those found...&quot;  Was I correct, or are both versions right?